Re: [REPORT] cfs-v4 vs sd-0.44

From: Ulrich Drepper
Date: Sat Apr 21 2007 - 14:09:36 EST


On 4/21/07, Ingo Molnar <mingo@xxxxxxx> wrote:
on a simple 'ls' command:

21310 clone(child_stack=0, ...) = 21399
...
21399 execve("/bin/ls",
...
21310 waitpid(-1, <unfinished ...>

the PID is -1 so we dont actually know which task we are waiting for.

That's a special case. Most programs don't do this. In fact, in
multi-threaded code you better never do it since such an unqualified
wait might catch the child another thread waits for (particularly bad
if one thread uses system()).

And even in the case of bash, we probably can change to code to use a
qualified wait in case there are no other children. This is known at
any time and I expect that most of the time there are no background
processes. At least in shell scripts.
-
To unsubscribe from this list: send the line "unsubscribe linux-kernel" in
the body of a message to majordomo@xxxxxxxxxxxxxxx
More majordomo info at http://vger.kernel.org/majordomo-info.html
Please read the FAQ at http://www.tux.org/lkml/