On Fri, Feb 24, 2012 at 09:35:24PM +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)
> 
>  Race conditions ? The semantics I'm suggesting are perfectly clear and
> atomic. Process 1 exits -> the kernel reads its exit code and performs
> a reboot(), poweroff() or kexec() system call, *at once*.

What about SMP? I agree it's possible that there's no issue, but it's
also possible that there would be issues, and it's a sufficiently ugly
situation that I'd rather we not have to think about whether it's
safe/secure by just not creating it. :)

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

Reply via email to