[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]
Multiple concurrent coprocesses
From: |
Zachary Santer |
Subject: |
Multiple concurrent coprocesses |
Date: |
Sat, 20 Mar 2021 11:47:01 -0400 |
Multiple concurrent coprocesses simplified one of my scripts a good bit,
and then I ran into this
<https://lists.gnu.org/archive/html/bug-bash/2011-04/msg00056.html>.
Considering a decade has passed, I'm assuming the ship has kind of sailed
on Chet finishing support for it, so I'm curious what's missing. I might
like to submit my own patch.
I'm working with Bash 4.2 at my day job, though. Multiple
concurrent coprocesses replaced dynamically creating different sets of
FIFOs and creating automatic file descriptors for those FIFOs in the parent
process and subprocesses, so anything simpler than that would be nice.
On freenode #bash, I got the following advice:
> it's possible to dup the fd's for the coprocess and close the originals,
then close the coproc (which keeps running) and start a new one
> it's not just avoiding the error message, it's actually guaranteed to
work with or without support for multiple coprocesses
Is that true? Is this a safe approach?
Is closing the file descriptors that the coproc keyword generates not
sufficient to close the coproc?
Thanks for your help.
Zack
- Multiple concurrent coprocesses,
Zachary Santer <=
- Re: Multiple concurrent coprocesses, Chet Ramey, 2021/03/20
- Re: Multiple concurrent coprocesses, Zachary Santer, 2021/03/21
- Re: Multiple concurrent coprocesses, Chet Ramey, 2021/03/22
- Re: Multiple concurrent coprocesses, Alex fxmbsw7 Ratchev, 2021/03/22
- Re: Multiple concurrent coprocesses, Zachary Santer, 2021/03/22
- Re: Multiple concurrent coprocesses, Zachary Santer, 2021/03/23
- Re: Multiple concurrent coprocesses, Chet Ramey, 2021/03/30
- Re: Multiple concurrent coprocesses, Zachary Santer, 2021/03/30