bug-bash
[Top][All Lists]
Advanced

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

Re: Racing condition leads to unstable exit code


From: Chet Ramey
Subject: Re: Racing condition leads to unstable exit code
Date: Wed, 3 May 2017 10:40:24 -0400
User-agent: Mozilla/5.0 (Macintosh; Intel Mac OS X 10.12; rv:52.0) Gecko/20100101 Thunderbird/52.0.1

On 5/2/17 9:07 PM, Luiz Angelo Daros de Luca wrote:
> Hi Chet,
> 
> Is there any news on this? I noticed that Bash-4.4 patch 11 do touches
> something related to
> signals, subshell and command substitution but I still get the same
> behavior on 4.4.12(1)-release (x86_64-suse-linux-gnu)
> 
> I came up with a smaller script for this bug.
> 
> trap "sleep 2" USR1
> x=$(kill -USR1 $$; sleep 0.5; exit 2)
> echo "$BASHPID:err=$? (should be 2)" >&2

I get err=2 with the current devel branch source.

Chet


-- 
``The lyf so short, the craft so long to lerne.'' - Chaucer
                 ``Ars longa, vita brevis'' - Hippocrates
Chet Ramey, UTech, CWRU    address@hidden    http://cnswww.cns.cwru.edu/~chet/



reply via email to

[Prev in Thread] Current Thread [Next in Thread]