-
start.c: handle potential signal flood · 80507ee8Serge Hallyn authored
Signalfd does not guarantee that we'll get an event for every signal. So if 3 tasks exit at the same time, we may get only one sigchld event. Therefore, in signal_handler(), always check whether init has exited. Do with with WNOWAIT so that we can still wait4 to cleanup the init after lxc_poll() exists (rather than complicating the code). Note - there is still a race in the kernel which can cause the container init to become a defunct child of the host init (!). This doesn't solve that, but is a potential (if very unlikely) race which apw pointed out while we were trying to create a reproducer for the kernel bug. Signed-off-by:
Serge Hallyn <serge.hallyn@ubuntu.com> Acked-by:
Stéphane Graber <stgraber@ubuntu.com>
80507ee8
| Name |
Last commit
|
Last update |
|---|---|---|
| .. | ||
| include | Loading commit data... | |
| lua-lxc | Loading commit data... | |
| lxc | Loading commit data... | |
| python-lxc | Loading commit data... | |
| tests | Loading commit data... | |
| Makefile.am | Loading commit data... |