Commit 1edfa642 authored by Ingo Molnar's avatar Ingo Molnar

[PATCH] O(1) sys_exit(), threading, scalable-exit-2.5.31-A6

This fixes the ptrace wait4() anomaly that can be observed in any
previous Linux kernel i could get my hands at.

If the parent still has other children (that are being traced by
somebody), we wait for them or return immediately without an error in
case of WNOHANG.
parent 7e2e73a7
......@@ -731,7 +731,7 @@ asmlinkage long sys_wait4(pid_t pid,unsigned int * stat_addr, int options, struc
tsk = next_thread(tsk);
} while (tsk != current);
read_unlock(&tasklist_lock);
if (flag) {
if (flag || !list_empty(&current->ptrace_children)) {
retval = 0;
if (options & WNOHANG)
goto end_wait4;
......
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