add 2 second sleep before rebooting
authorJohn Crispin <blogic@openwrt.org>
Wed, 3 Jul 2013 13:55:26 +0000 (15:55 +0200)
committerJohn Crispin <blogic@openwrt.org>
Wed, 3 Jul 2013 18:28:03 +0000 (20:28 +0200)
stderr is lost without this whena  crash happens

Signed-off-by: John Crispin <blogic@openwrt.org>
signal.c

index 0bb881e..ebaf7bc 100644 (file)
--- a/signal.c
+++ b/signal.c
@@ -26,6 +26,7 @@ static void do_reboot(void)
        LOG("reboot\n");
        fflush(stderr);
        sync();
        LOG("reboot\n");
        fflush(stderr);
        sync();
+       sleep(2);
        reboot(RB_AUTOBOOT);
        while (1)
        ;
        reboot(RB_AUTOBOOT);
        while (1)
        ;