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

MichaƂ Zegan webczat_200 at poczta.onet.pl
Sat May 27 18:51:04 UTC 2017


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.
I have verified that reboot actually triggers sighup. does it mean you
cannot "reboot -f" in a pid namespace, because it will actually trigger
something like "systemctl daemon-reload"? (confusing behavior)...
About poweroff, I used unshare -Upfr and then typed poweroff -f, and the
bash started by unshare exited. Bash does not exit on sigint, so not
sure what was sent? sigkill?
Also, how does systemd handle this case when you tell systemd to power
off/reboot? it probably exits instead of calling reboot(2), but does it
make it possible to distinguish reboot from power off?
Sorry for such an partially offtopic question.

-------------- 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/20170527/4cd001e5/attachment.sig>


More information about the systemd-devel mailing list