Re: [PATCH 0/2] Send a SIGCHLD to the init's pid namespace parent when reboot

Serge E. Hallyn
2011-08-14T21:36:17Z

Quoting Oleg Nesterov (oleg@redhat.com):
> On 08/11, Daniel Lezcano wrote:
> >
> > In the case of a VPS, when we shutdown/halt/reboot the container, the
> > reboot utility will invoke the sys_reboot syscall which has the bad
> > effect to reboot the host.
>
> Stupid question. Can't sys_reboot() simply kill init (and thus the whole
> pid_ns) in this case?

The goal is to be able to distinguish a request for reboot from shutdown.
If we just kill the init, then the parent of init (the container monitor)
cannot restart the container to emulate reboot.

[ sorry if I misunderstand what you're asking ]

-serge