[systemd-devel] switch-root, init, SIGHUP
James Muir (jamesmui)
jamesmui at cisco.com
Sat Jan 18 05:40:17 UTC 2025
I have a program, init-jm, that forks and executes /usr/lib/systemd/systemd in the parent (using execl() ) while the child collects some stats in a loop.
The child sets its argv[0][0] to ‘@’.
init-jm is invoked using the “init” kernel parameter on a switch-root system (it’s Fedora 41).
Can someone explain why systemd (PID 1) sends SIGHUP to the child?
This happens just before the statement log_execution_mode(&first_boot) is executed inside main().
Sending SIGHUP to the child seems to be particular to the re-execution of the systemd binary during switch-root because it is not sent when init-jm is invoked using “rdinit”.
Thanks,
-James M
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <https://lists.freedesktop.org/archives/systemd-devel/attachments/20250118/b96b5c6a/attachment.htm>
More information about the systemd-devel
mailing list