summaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorJohn Crispin <blogic@openwrt.org>2013-06-27 19:14:03 +0200
committerJohn Crispin <blogic@openwrt.org>2013-06-27 20:20:18 +0200
commit0d44f0de9eacf687182ebebfcb1f9496dbf3bc32 (patch)
tree7a0aedbf675cda0d5fe4474a0cd653bfcc9d244c
parent7f31a19db4c88ca17837a2aaa9144622522d0726 (diff)
downloadunitd-0d44f0de9eacf687182ebebfcb1f9496dbf3bc32.tar
unitd-0d44f0de9eacf687182ebebfcb1f9496dbf3bc32.zip
get rid of sleep() calls
Signed-off-by: John Crispin <blogic@openwrt.org>
-rw-r--r--signal.c1
-rw-r--r--state.c3
2 files changed, 1 insertions, 3 deletions
diff --git a/signal.c b/signal.c
index b62da0a..0bb881e 100644
--- a/signal.c
+++ b/signal.c
@@ -26,7 +26,6 @@ static void do_reboot(void)
LOG("reboot\n");
fflush(stderr);
sync();
- sleep(1);
reboot(RB_AUTOBOOT);
while (1)
;
diff --git a/state.c b/state.c
index 618d758..cf0c81d 100644
--- a/state.c
+++ b/state.c
@@ -63,12 +63,11 @@ static void state_enter(void)
case STATE_SHUTDOWN:
LOG("- shutdown -\n");
procd_inittab_run("shutdown");
+ sync();
break;
case STATE_HALT:
LOG("- reboot -\n");
- sync();
- sleep(1);
reboot(reboot_event);
break;