bug-bash
[Top][All Lists]
Advanced

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

Re: wait -n -p var assigns a random number to var if there are no jobs


From: Chet Ramey
Subject: Re: wait -n -p var assigns a random number to var if there are no jobs
Date: Fri, 11 Dec 2020 09:49:51 -0500
User-agent: Mozilla/5.0 (Macintosh; Intel Mac OS X 10.15; rv:78.0) Gecko/20100101 Thunderbird/78.5.1

On 12/11/20 5:25 AM, Oğuz wrote:
See:

$ echo $BASH_VERSION
5.1.0(1)-release
$
$ jobs
$ wait -n -p var
$ echo $var $?
66390280 127

If it left `var' unset that would be way more helpful to determine whether
one of the jobs exited with 127 or all the jobs were waited for and none
left.

Thanks for the report. That makes sense.

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



reply via email to

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