Merge pull request #2923 from flx42/more-pdeathsig-fixes

More pdeathsig fixes
This commit is contained in:
Christian Brauner 2019-04-04 16:50:41 +02:00 committed by GitHub
commit 4f34c6f95d
No known key found for this signature in database
GPG Key ID: 4AEE18F83AFDEB23

View File

@ -1190,7 +1190,7 @@ static int do_start(void *data)
goto out_warn_father;
/* set{g,u}id() clears deathsignal */
ret = lxc_set_death_signal(SIGKILL, 0);
ret = lxc_set_death_signal(SIGKILL, handler->monitor_pid);
if (ret < 0) {
SYSERROR("Failed to set PR_SET_PDEATHSIG to SIGKILL");
goto out_warn_father;
@ -1438,7 +1438,7 @@ static int do_start(void *data)
}
if (handler->conf->monitor_signal_pdeath != SIGKILL) {
ret = lxc_set_death_signal(handler->conf->monitor_signal_pdeath, 0);
ret = lxc_set_death_signal(handler->conf->monitor_signal_pdeath, handler->monitor_pid);
if (ret < 0) {
SYSERROR("Failed to set PR_SET_PDEATHSIG to %d",
handler->conf->monitor_signal_pdeath);