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: Fri, 30 Sep 2016 10:19:30 -0400
User-agent: Mozilla/5.0 (Macintosh; Intel Mac OS X 10.11; rv:45.0) Gecko/20100101 Thunderbird/45.3.0

On 9/30/16 10:11 AM, Luiz Angelo Daros de Luca wrote:
> Yes, this is the part that I agree. However, this is the other behavior of
> bash wait (from bash manual)
> 
> "When Bash is waiting for an asynchronous command via the wait builtin, the
> reception of a signal for which a trap has been set will cause
> the wait builtin to return immediately with an exit status greater than
> 128, immediately after which the trap is executed."

That's pretty much straight out of the portion of the Posix standard I
quoted:


>     Posix says:
> 
>     "When the shell is waiting, by means of the wait utility, for asynchronous
>     commands to complete, the reception of a signal for which a trap has been
>     set shall cause the wait utility to return immediately with an exit status
>     >128, immediately after which the trap associated with that signal shall 
> be
>     taken."


-- 
``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]