On Fri, Feb 24, 2012 at 01:59:30AM +0100, Laurent Bercot wrote:
> [ Side note : panicking when process 1 exits is a *very* silly thing
> for the kernel to do. Process 1 exiting, instead of being forbidden,
> should mean the end of the machine's life cycle, and the kernel should
> either halt, reboot, or even kexec something else, depending on process
> 1's exit code. But that is totally off-topic. ]

I suspect there might be ugly race conditions in this case (in the
window between process 1 ceasing to exist and the system shutting
down or doing whatever), and there's also the issue of special-casing
who gets the SIGCHLD, and whether process 1 would be zombie, etc. when
init terminates. Rather than handling all that and running the risk of
getting it wrong and having race conditions where the machine fails to
reboot right, I think it makes a lot more sense to just say init isn't
allowed to terminate and that it calls reboot() or similar when it
want to reboot the machine (instead of exiting).

Rich
_______________________________________________
busybox mailing list
[email protected]
http://lists.busybox.net/mailman/listinfo/busybox

Reply via email to