Commit 7e610509 by Felix Abecassis

utils: fix handling of PID namespaces in lxc_set_death_signal

parent bbebc423
......@@ -1705,9 +1705,9 @@ int lxc_set_death_signal(int signal, pid_t parent)
ret = prctl(PR_SET_PDEATHSIG, prctl_arg(signal), prctl_arg(0),
prctl_arg(0), prctl_arg(0));
/* Check whether we have been orphaned. */
/* If not in a PID namespace, check whether we have been orphaned. */
ppid = (pid_t)syscall(SYS_getppid);
if (ppid != parent) {
if (ppid && ppid != parent) {
ret = raise(SIGKILL);
if (ret < 0)
return -1;
......
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment