Re: Racing condition leads to unstable exit code

2017-05-05 Thread Luiz Angelo Daros de Luca
It works perfectly on v4.4. Thanks! Em sex, 5 de mai de 2017 às 12:09, Chet Ramey escreveu: > On 5/4/17 3:05 PM, Chet Ramey wrote: > > >> Would the fix be backported to stable? > > > > Let me see if I can put together a patch for you to test. > > -- > ``The lyf so short, the craft so long to ler

Re: Racing condition leads to unstable exit code

2017-05-05 Thread Chet Ramey
On 5/4/17 3:05 PM, Chet Ramey wrote: >> Would the fix be backported to stable? > > Let me see if I can put together a patch for you to test. -- ``The lyf so short, the craft so long to lerne.'' - Chaucer ``Ars longa, vita brevis'' - Hippocrates Chet Ramey, UTech, CWRUc...@c

Re: Racing condition leads to unstable exit code

2017-05-04 Thread Chet Ramey
On 5/3/17 8:43 PM, Luiz Angelo Daros de Luca wrote: > Yes, the devel one does work. Sorry for the confusion. > It is the first time I see master as stable. It was like that when I inherited it, and I didn't have enough git expertise to fold in all of the previous commits where they should go, so I

Re: Racing condition leads to unstable exit code

2017-05-03 Thread Luiz Angelo Daros de Luca
Yes, the devel one does work. Sorry for the confusion. It is the first time I see master as stable. Would the fix be backported to stable? Em qua, 3 de mai de 2017 às 19:33, Chet Ramey escreveu: > On 5/3/17 6:07 PM, Luiz Angelo Daros de Luca wrote: > > Strange... I still get 0 > > Yes, that's n

Re: Racing condition leads to unstable exit code

2017-05-03 Thread Chet Ramey
On 5/3/17 6:07 PM, Luiz Angelo Daros de Luca wrote: > Strange... I still get 0 Yes, that's not the devel branch. -- ``The lyf so short, the craft so long to lerne.'' - Chaucer ``Ars longa, vita brevis'' - Hippocrates Chet Ramey, UTech, CWRUc...@case.eduhttp://cnswww.cns.

Re: Racing condition leads to unstable exit code

2017-05-03 Thread Eduardo Bustamante
On Wed, May 3, 2017 at 5:07 PM, Luiz Angelo Daros de Luca wrote: > Strange... I still get 0 > > $ git clone https://git.savannah.gnu.org/git/bash.git [...] git checkout devel

Re: Racing condition leads to unstable exit code

2017-05-03 Thread Luiz Angelo Daros de Luca
Strange... I still get 0 $ git clone https://git.savannah.gnu.org/git/bash.git $ cd bash/ $ ./configure $ make $ ./bash testtrap.bash 18173:err=0 (should be 2) $ ./bash --version GNU bash, version 4.4.12(1)-release (x86_64-unknown-linux-gnu) Copyright (C) 2016 Free Software Foundation, Inc. Licens

Re: Racing condition leads to unstable exit code

2017-05-03 Thread Chet Ramey
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

Re: Racing condition leads to unstable exit code

2017-05-02 Thread Luiz Angelo Daros de Luca
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=$(kil

Re: Racing condition leads to unstable exit code

2016-09-30 Thread Reuti
Hi, > Am 30.09.2016 um 16:11 schrieb Luiz Angelo Daros de Luca : > > 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 tra

Re: Racing condition leads to unstable exit code

2016-09-30 Thread Chet Ramey
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 wi

Re: Racing condition leads to unstable exit code

2016-09-30 Thread Luiz Angelo Daros de Luca
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 sta

Re: Racing condition leads to unstable exit code

2016-09-30 Thread Chet Ramey
On 9/29/16 10:58 PM, Luiz Angelo Daros de Luca wrote: > No problem! I already workarounded it using pipe as a semaphore. Thanks! > > It's there any chance of changing the 128+signal exit code for wait when > trap is received? > It might solve some special usecase which I'm not aware. Wait should a

Re: Racing condition leads to unstable exit code

2016-09-29 Thread Luiz Angelo Daros de Luca
No problem! I already workarounded it using pipe as a semaphore. Thanks! It's there any chance of changing the 128+signal exit code for wait when trap is received? It might solve some special usecase which I'm not aware. Wait should always returns exit code related to the child process, except for

Re: Racing condition leads to unstable exit code

2016-09-29 Thread Chet Ramey
On 9/23/16 3:04 PM, Luiz Angelo Daros de Luca wrote: > Hello, > > I'm using 'GNU bash, version 4.3.46(1)-release (x86_64-suse-linux-gnu)' > provided by OpenSUSE Tumbleweed. I recently faced a problem that, depending > on the system load, bash returns different exit codes. I detected that it > is r