[systemd-devel] pid namespaces, systemd and signals on reboot(2)

Michał Zegan webczat_200 at poczta.onet.pl
Mon May 29 13:09:54 UTC 2017



W dniu 29.05.2017 o 11:37, Lennart Poettering pisze:
> On Sat, 27.05.17 20:51, Michał Zegan (webczat_200 at poczta.onet.pl) wrote:
> 
>> Hello.
>>
>> I came across the following:
>> The manpage reboot(2) says, that inside of a pid namespace, a reboot
>> call that normally would trigger restart actually triggers sending
>> sighup to the init of a namespace, and sigint is sent in case of
>> halt/poweroff.
> 
> That's misleading. This is not what happens. Instead, PID 1's parent
> (i.e. the container manager) will be notified about reboot() being
> called inside the container by a waitid() event of the container's PID
> 1, where the exit cause is reported to be an uncaught SIGHUP.
> 
> It's quite hacky to report it that way, since there's no way to
> distuingish a real SIGHUP exit from a reboot() exit this way, but it's
> how the the kernel decided to do it.
> 
> Or in other words: SIGHUP on the container's PID 1 is how the reboot()
> is *reported*, not what actually happened.
> 
> Lennart
> 
what you just said means a man-pages doc bug and I have reported it
yesterday, thank you.

-------------- next part --------------
A non-text attachment was scrubbed...
Name: signature.asc
Type: application/pgp-signature
Size: 525 bytes
Desc: OpenPGP digital signature
URL: <https://lists.freedesktop.org/archives/systemd-devel/attachments/20170529/22e06008/attachment.sig>


More information about the systemd-devel mailing list