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

Ulrich Drepper
2007-04-21T18:09:22Z

On 4/21/07, Ingo Molnar <mingo@elte.hu> 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.