[systemd-devel] Shutting down service using systemd-nspawn
lennart at poettering.net
Wed May 13 10:44:18 PDT 2015
On Thu, 07.05.15 06:38, Peter Paule (systemd-devel at fedux.org) wrote:
> > I implemented this now:
> > http://cgit.freedesktop.org/systemd/systemd/commit/?id=c6c8f6e218995852350e5e35c080dec788c42c3f
> Thanks a lot. Sorry, have seen your mail to late - I'm trying out a new
> mua (sup) and I'm not that familiar with it yet.
> Do you think it makes sense to add something like
> `--pass-signals SIGHUP,SIGINT,SIGWINCH`
> as well? Making `systemd-nspawn` to pass those
> signals to PID 1 if it receives those signals.
> Use case:
> Either make PID 1 to react on those signals or test how it will react if
> you're using `systemd-nspawn` to test some software you develop.
Not sure I follow: why do this indirectly by killing nspawn?
Why not send this to the container init directly?
Note that if you know the nspawn PID, you can derive the external PID
of the init process easily by reading
/proc/$PID/task/$PID/children. It will only container one PID, and
Lennart Poettering, Red Hat
More information about the systemd-devel