help-bash
[Top][All Lists]
Advanced

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

Re: [Help-bash] Waiting for a sub-process to finish


From: João Eiras
Subject: Re: [Help-bash] Waiting for a sub-process to finish
Date: Thu, 1 Jun 2017 23:11:43 +0200

Talking generically about process substitution

  command <(generate_input) > >(collect_output)
  second_co

Looking at that code I would always expect the three tasks to be
completed before "second_command" executed, since there is no
ampersand (&) being used anywhere. Else, every single time there is
some process substitution, one would be forced to use job control plus
"wait", which does not make that much sense as "jobs" yields nothing
and $! only returns the last process.

So, every single instruction that adds a substituted process, should
be followed by an implicit "wait address@hidden". At the very
least I'd like see such behavior being a shell option
(https://www.gnu.org/software/bash/manual/html_node/The-Shopt-Builtin.html)
Or, at least "jobs" should be populated accordingly and "wait" work as
such, which is what bash 4.4 does I presume.

Cheers.



reply via email to

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