|
From: | Chet Ramey |
Subject: | Re: Coproc within coproc supported? |
Date: | Fri, 18 Nov 2022 11:31:44 -0500 |
User-agent: | Mozilla/5.0 (Macintosh; Intel Mac OS X 10.15; rv:102.0) Gecko/20100101 Thunderbird/102.4.2 |
On 11/18/22 5:33 AM, Tadeus Prastowo wrote:
A (subshell) is an exact copy of the parent shell, so it inherits the coproc. It just won't be able to write or read to the coproc, and can't wait for a coproc it inherits, since the subshell is not the coproc process's parent.Given that coprocs are process-based and a subshell is a new process despite being an exact copy of the parent process, I think logically it follows that it is not a bug if the subshell creates a coproc. Therefore, Bash back in the version 4.3.48 should have not issued the coproc-exists warning.
Sure, it was a spurious warning that didn't prevent the subshell from instantiating another coproc. -- ``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/
[Prev in Thread] | Current Thread | [Next in Thread] |