diff options
author | Ron Yorston <rmy@pobox.com> | 2018-10-08 08:31:11 +0100 |
---|---|---|
committer | Ron Yorston <rmy@pobox.com> | 2018-10-08 08:31:11 +0100 |
commit | eee3722fd32c8c0929cfbacdbe0b6524e1fd645c (patch) | |
tree | c9026160e56f204c42029c705d1d16cecd515244 /init | |
parent | 25a1bcec7637e0f0c75d3ae6c09eb78fdb6f0a75 (diff) | |
parent | 349d72c19ced4fae64e8fdd5792b37e78ac2f616 (diff) | |
download | busybox-w32-eee3722fd32c8c0929cfbacdbe0b6524e1fd645c.tar.gz busybox-w32-eee3722fd32c8c0929cfbacdbe0b6524e1fd645c.tar.bz2 busybox-w32-eee3722fd32c8c0929cfbacdbe0b6524e1fd645c.zip |
Merge branch 'busybox' into merge
Diffstat (limited to 'init')
-rw-r--r-- | init/init.c | 9 |
1 files changed, 7 insertions, 2 deletions
diff --git a/init/init.c b/init/init.c index 6439e2bcd..fde35f6b6 100644 --- a/init/init.c +++ b/init/init.c | |||
@@ -752,8 +752,13 @@ static void pause_and_low_level_reboot(unsigned magic) | |||
752 | reboot(magic); | 752 | reboot(magic); |
753 | _exit(EXIT_SUCCESS); | 753 | _exit(EXIT_SUCCESS); |
754 | } | 754 | } |
755 | while (1) | 755 | /* Used to have "while (1) sleep(1)" here. |
756 | sleep(1); | 756 | * However, in containers reboot() call is ignored, and with that loop |
757 | * we would eternally sleep here - not what we want. | ||
758 | */ | ||
759 | waitpid(pid, NULL, 0); | ||
760 | sleep(1); /* paranoia */ | ||
761 | _exit(EXIT_SUCCESS); | ||
757 | } | 762 | } |
758 | 763 | ||
759 | static void run_shutdown_and_kill_processes(void) | 764 | static void run_shutdown_and_kill_processes(void) |