diff options
author | Eric Andersen | 2003-04-24 11:41:28 +0000 |
---|---|---|
committer | Eric Andersen | 2003-04-24 11:41:28 +0000 |
commit | 2c1de61023d384fd0a365405925940c3528cb75a (patch) | |
tree | 5839e97767864319de033cec3448767e0e43d016 /testsuite/tee | |
parent | afc01cd48544d4e0e7575a8518e575dd499e297c (diff) | |
download | busybox-2c1de61023d384fd0a365405925940c3528cb75a.zip busybox-2c1de61023d384fd0a365405925940c3528cb75a.tar.gz |
There have been many reports of init failing to reboot and/or failing to halt
over the years. Well I finally took the time to track this down. It turns out
that inside linux/kernel/sys.c the kernel will call
machine_halt();
do_exit(0);
when halting, or will call
machine_power_off();
do_exit(0);
during a reboot. Unlike sysv init, we call reboot from within the init
process, so if the call to machine_halt() or machine_power_off() returns, the call to do_exit(0) will cause the kernel to panic. Which is a very
bad thing to happen.
So I just added this little patch to fork and call the reboot
syscall from within the forked child process, thereby neatly
avoiding the problem.
But IMHO, both calls to do_exit(0) within linux/kernel/sys.c
are bugs and should be fixed.
-Erik
Diffstat (limited to 'testsuite/tee')
0 files changed, 0 insertions, 0 deletions