[systemd-devel] [PATCH] nspawn: check the pid in SIGCHLD handler before terminating the container
lennart at poettering.net
Wed May 13 09:19:33 PDT 2015
On Sun, 10.05.15 19:29, Alban Crequy (alban.crequy at gmail.com) wrote:
> From: Alban Crequy <alban at endocode.com>
> When a process starts systemd-nspawn with exec*() without fork(),
> systemd-nspawn can be the parent process of children processes unknown
> to systemd-nspawn. It can then receive the signal SIGCHLD for both the
> container leader process and the previously started processes. So it
> should distinguish them.
Is this still relevant?
systemd-nspawn uses waitid(P_PID) and specifies the container's main
PID, thus it should explicitly only wait for that and not get confused
by other PIDs. Hence I am not really getting what the patch is
about... (I mean, it will not reap those other processes, but it will
not get confused by them either...)
I am pretty sure we should never bother with SIGCHLD for this. It's
the wrong kind of notification.
If this still is an issue, and this is about reaping unknown
processes, then I'd be open to extending wait_for_terminate() to also
reap all unknown processes while we wait for the one we really care
Lennart Poettering, Red Hat
More information about the systemd-devel