[systemd-devel] switch-root, init, SIGHUP

Brian Masney bmasney at redhat.com
Tue Jan 21 01:50:24 UTC 2025


Hey James,

On Mon, Jan 20, 2025 at 1:21 PM James Muir (jamesmui)
<jamesmui at cisco.com> wrote:
> I think the SIGHUP must come from the new PID 1.

I don't know if this will help you, however here is a program that I
wrote last year that starts a service in the initramfs, it survives
the systemd killing spree during the transition to the root
filesystem, a new copy of the program is started from the root
filesystem, the previous running state is passed from the initramfs to
the version started from the root filesystem, and the version started
from the initramfs is gracefully shut down. The program does not have
the SIGHUP issue that you describe, so maybe there's something here
that may help you.

https://github.com/masneyb/early-service-example

Brian



More information about the systemd-devel mailing list