summaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorJohn Crispin <blogic@openwrt.org>2013-07-03 15:55:26 +0200
committerJohn Crispin <blogic@openwrt.org>2013-07-03 20:28:03 +0200
commita2953547e345eb6dd4e48474ca1e48082d3d564f (patch)
tree1d1254a300d7399710e1dd882b75b295ab6d23b8
parentd2f216cddaf4ee73117bb2693fc53b77f67517ad (diff)
downloadunitd-a2953547e345eb6dd4e48474ca1e48082d3d564f.tar
unitd-a2953547e345eb6dd4e48474ca1e48082d3d564f.zip
add 2 second sleep before rebooting
stderr is lost without this whena crash happens Signed-off-by: John Crispin <blogic@openwrt.org>
-rw-r--r--signal.c1
1 files changed, 1 insertions, 0 deletions
diff --git a/signal.c b/signal.c
index 0bb881e..ebaf7bc 100644
--- 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)
;