[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]
Re: Coproc within coproc supported?
From: |
Chet Ramey |
Subject: |
Re: Coproc within coproc supported? |
Date: |
Wed, 16 Nov 2022 09:36:15 -0500 |
User-agent: |
Mozilla/5.0 (Macintosh; Intel Mac OS X 10.15; rv:102.0) Gecko/20100101 Thunderbird/102.4.2 |
On 11/16/22 2:18 AM, Tadeus Prastowo wrote:
Hi!
The Bash 4.3.48 that comes shipped with Ubuntu 16.04 does not support
multiple coprocesses, giving a warning when the second coprocess is
created ("bash: warning: execute_coproc: coproc [16388:COPROC] still
exists").
Wow, that's old.
As documented in the corresponding Bash man page, the section BUGS
states that "[t]here may be only one active coprocess at a time."
Yes, the shell doesn't try to keep track of more than one coprocess at
a time, and creating a new coproc overwrites the information about any
current one. Any existing shell variables describing previous coprocs
will remain, but the shell won't update them when the coproc exits, for
instance.
Is it true that the intention of the statement in the man page is that
at most one coprocess exists for every concurrently running Bash
process where $$ expands to the same PID?
No. Coprocs are process-based.
--
``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/
- Coproc within coproc supported?, Tadeus Prastowo, 2022/11/16
- Re: Coproc within coproc supported?, Alex fxmbsw7 Ratchev, 2022/11/16
- Re: Coproc within coproc supported?,
Chet Ramey <=
- Re: Coproc within coproc supported?, Alex fxmbsw7 Ratchev, 2022/11/16
- Re: Coproc within coproc supported?, Tadeus Prastowo, 2022/11/17
- Re: Coproc within coproc supported?, Chet Ramey, 2022/11/17
- Re: Coproc within coproc supported?, Tadeus Prastowo, 2022/11/18
- Re: Coproc within coproc supported?, Chet Ramey, 2022/11/18
- Re: Coproc within coproc supported?, Tadeus Prastowo, 2022/11/18
- Re: Coproc within coproc supported?, Chet Ramey, 2022/11/21
- Re: Coproc within coproc supported?, Tadeus Prastowo, 2022/11/22