diff options
| author | Linus Torvalds <torvalds@home.osdl.org> | 2003-07-26 19:19:28 -0700 |
|---|---|---|
| committer | Linus Torvalds <torvalds@home.osdl.org> | 2003-07-26 19:19:28 -0700 |
| commit | 3b3b14de6dcd9718578e19f9720065a61da5ea09 (patch) | |
| tree | e185555c7d0259a2bfa0c697b3f8fce610621288 | |
| parent | 176a9075536cf95d4ae70961364a324defda2b21 (diff) | |
When zapping the thread list due to an execve(), make sure to
also detach the threads.
Otherwise we'll leave them around as zombies, waiting for them
to be picked up by their parent. Which might be the execve()
thread itself, causing a deadlock.
| -rw-r--r-- | kernel/signal.c | 9 |
1 files changed, 9 insertions, 0 deletions
diff --git a/kernel/signal.c b/kernel/signal.c index 7ac72191b30b..cd0690a66f24 100644 --- a/kernel/signal.c +++ b/kernel/signal.c @@ -1000,6 +1000,15 @@ void zap_other_threads(struct task_struct *p) return; for (t = next_thread(p); t != p; t = next_thread(t)) { + /* + * We don't want to notify the parent, since we are + * killed as part of a thread group due to another + * thread doing an execve() or similar. So set the + * exit signal to -1 to allow immediate reaping of + * the process. + */ + t->exit_signal = -1; + sigaddset(&t->pending.signal, SIGKILL); rm_from_queue(SIG_KERNEL_STOP_MASK, &t->pending); signal_wake_up(t, 1); |
