Re: [PATCH] DejaGnu kills the wrong process due to PID-reuse races

Pedro Alves <[email protected]>
Newsgroups gmane.comp.sysutils.dejagnu.general
Message-ID <[email protected]>
On 07/29/2015 09:43 AM, Andreas Schwab wrote:
> Pedro Alves <[email protected]> writes:
> 
>> +	# Prepend "-" to generate the "process group ID" needed by
>> +	# kill.
>> +	set pgid "-[join $pid { -}]"
> 
> That's an odd way to write [expr -$pid].

Indeed.  I just copied it here from local_exec without thinking about
it.  Do we even need [expr]?   I'd think:

  set pgid "-$pid"

would work just as well.

Thanks,
Pedro Alves
lmpx.com only provides a reader for public news (NNTP) servers. It is not affiliated with the servers or forums shown here and is not responsible for the content of articles, which is written by their respective authors.