|
@@ -149,7 +149,12 @@ void zap_pid_ns_processes(struct pid_namespace *pid_ns)
|
|
|
{
|
|
|
int nr;
|
|
|
int rc;
|
|
|
- struct task_struct *task;
|
|
|
+ struct task_struct *task, *me = current;
|
|
|
+
|
|
|
+ /* Ignore SIGCHLD causing any terminated children to autoreap */
|
|
|
+ spin_lock_irq(&me->sighand->siglock);
|
|
|
+ me->sighand->action[SIGCHLD - 1].sa.sa_handler = SIG_IGN;
|
|
|
+ spin_unlock_irq(&me->sighand->siglock);
|
|
|
|
|
|
/*
|
|
|
* The last thread in the cgroup-init thread group is terminating.
|