Zsh Mailing List Archive
Messages sorted by: Reverse Date, Date, Thread, Author

Re: 'wait' exit status and warnings [was: The big kre zsh bug report]



Op 30-12-18 om 18:13 schreef Peter Stephenson:
> On Tue, 2018-12-25 at 20:44 +0000, Martijn Dekker wrote:
>> Op 21-12-18 om 07:53 schreef Bart Schaefer:
>>> On Thu, Dec 20, 2018 at 2:48 PM Martijn Dekker <martijn@xxxxxxxx> wrote:
>>>>> tc-so:Executing command [ zsh --emulate sh -c wait 1 ]
>>>>> tc-se:Fail: incorrect exit status: 1, expected: 127
>>>
>>> Probably easily fixed.
>>
>> Well, kind of.
>>
>> I got as far as the attached patch, but it turns out there is another 
>> bug with 'wait': '(wait %1)' in a subshell quietly returns status 0 even 
>> if there is no such job. ('(wait %2)' and up are ok.)
> 
> Thanks --- for now I've committed this with the test doctored and a note
> in the test file.

I think my patch is wrong -- now 'fc' in POSIX mode doesn't give
warnings either, though it should. They should only be suppressed for
'wait'.

- M.



Messages sorted by: Reverse Date, Date, Thread, Author