On 3/9/15 6:19 PM, Peng Yu wrote:
>>
>>> $ bash --norc
>>> bash-4.3$ echo <(exit 123)
>>> /dev/fd/63
>>> bash-4.3$ echo "$!"
>>> 12142
>>> bash-4.3$ wait "$!"
>>> bash: wait: pid 12142 is not a child of this shell
>>>
>>> Having the process substitution pid in $! is not very useful if
>>> you can't wait for it to retrieve the status.
>>
>> I agree.  I will look at making that work for the next release of bash.
> 
> Would making an environment array (just as PIPE_STATUS) that will be
> expanded to the process IDs of the all executed background commands
> started from the last command be helpful to my original question? (But
> this should also work with commands connected by pipes in order to
> solve the problem.)

Doing something like that would be much more complicated and take much
more code (and bookkeeping) to implement.  If you'd like to take a shot
at creating a data structure to keep track of that information and a way
to expose it to a script writer, please do, and I will look at what you
come up with.

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

Reply via email to