diff options
author | andersen <andersen@69ca8d6d-28ef-0310-b511-8ec308f3f277> | 2003-04-24 11:41:28 +0000 |
---|---|---|
committer | andersen <andersen@69ca8d6d-28ef-0310-b511-8ec308f3f277> | 2003-04-24 11:41:28 +0000 |
commit | b122e565f22c2a16cbafc4a5e29fe36b118dc56e (patch) | |
tree | 5839e97767864319de033cec3448767e0e43d016 /docs | |
parent | 27f803c22fe0dc757112ceb536e883f5acdc6a15 (diff) | |
download | busybox-w32-b122e565f22c2a16cbafc4a5e29fe36b118dc56e.tar.gz busybox-w32-b122e565f22c2a16cbafc4a5e29fe36b118dc56e.tar.bz2 busybox-w32-b122e565f22c2a16cbafc4a5e29fe36b118dc56e.zip |
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
git-svn-id: svn://busybox.net/trunk/busybox@6808 69ca8d6d-28ef-0310-b511-8ec308f3f277
Diffstat (limited to 'docs')
0 files changed, 0 insertions, 0 deletions