Subject: bug#9098: timeout should use waitpid

From: Pádraig Brady <[email-masked]>
Date: Sat, 16 Jul 2011 14:15:25 +0100

On 16/07/11 13:17, Andreas Schwab wrote:
> timeout assumes that it only has to wait for a single child.  But this
> is not true, it can always inherit other children from its predecessor:
> 
> $ sh -c "sleep 1 & exec timeout 2 sh -c 'sleep 3; echo foo'"
> 
> This will echo foo after three seconds, although the inner shell is
> supposed to be killed after two seconds.
> 
> Andreas.
> 
>>>From 331a32b8bbe3cc07d5522004e90fba2bde20a1c3 Mon Sep 17 00:00:00 2001
> From: Andreas Schwab <[email-masked]>
> Date: Sat, 16 Jul 2011 13:51:06 +0200
> Subject: [PATCH] timeout: ignore inherited children
> 
> * src/timeout.c (main): Use waitpid instead of wait.

Thanks for that.
Also gnulib seems to support waitpid on mingw but not wait.

So I'll apply this.

thanks,
Pádraig.