On Fri, Jul 06, 2018 at 10:12:50AM +0200, Richard Biener wrote:

> Andreas Schwab rightfully points out that the test
> 
>     if { $pid > 0 } {
> 
> looks odd as well thus the whole close_wait_program function doesn't
> seem to expect multiple PIDs.  The above is probably to catch
> 
>     # If we didn't get EOF, we have to kill the poor defenseless program.
>     if { $got_eof } {
>         set pid -1
>     }
> 
> so it might work depending on what 12 234 > 0 semantically means
> for TCL...  That said, without touching the above test the following
> approach makes sure to not rely on any particular behavior for
> multi-process kills.

In this context, $pid > 0 is a lexographic greater-than test of $pid
with "0". eg:

% if {"1 2 3" > 1} { puts ok }
ok
% if {"1 2 3" > "1 2"} { puts ok }
ok
% if {"1 2 3" > "1 2 3"} { puts ok }
%

> I've verified it works for my case and I ran make check with the
> patch on the git head where all tests passed.

Thanks.

Ben

Attachment: signature.asc
Description: PGP signature

_______________________________________________
Bug-dejagnu mailing list
[email protected]
https://lists.gnu.org/mailman/listinfo/bug-dejagnu

Reply via email to