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 0bb881e4435bc06881598140c5aaa5abcbf54589..ebaf7bcf69f0ea8886af3d736613a49f1310e8f8 100644 (file)
--- a/signal.c
+++ b/signal.c
@@ -26,6 +26,7 @@ static void do_reboot(void)
        LOG("reboot\n");
        fflush(stderr);
        sync();
+       sleep(2);
        reboot(RB_AUTOBOOT);
        while (1)
        ;