I tried as many combinations of commands as I could - and it seems that the regular behavior of dup2 on the opened fifo is enough to maintain communication.
Going into a system test (ie. a normal AdoptOpemJDK build process) that 
has nearly 3500 commands, each with two process_substitution commands.
Maybe that fails - and then I'll have yet another test.

btw: other than the one open in the middle of process_substitution() I did not see anywhere where another process even tries to open the file.
what I also noticed is that the process, (iirc) that opens the file - 
never 'returns' - it ends via sh_exit() and the end of the routine.
Next time - I'll save all of my debug changes. Got a bit too rigorous 
when I cleaned up.
On 17/03/2021 19:03, Chet Ramey wrote:
On 3/17/21 11:52 AM, Michael Felt wrote:
OK - this process on github has not gone exactly as I intended - merged with master - while I wanted to update, ie., merge with branch 5.0.18. So, the link may not be accurate.
This is not correct. Process substitution is a word expansion that 
results
in a pathname. You can't just remove the pathname after the child 
opens it.
How will other processes that want to communicate with the process
substitution use it?

Attachment: OpenPGP_0x722BFDB61F396FC2.asc
Description: OpenPGP public key

Attachment: OpenPGP_signature
Description: OpenPGP digital signature

Reply via email to