On 11/8/26 2:48 PM, Koichi Murase wrote:
In the current devel branch, even if we close all standard streams of
a background process started in `eval' in a command substitution, the
command substitution blocks until the background process terminates.

Thanks for the report.

This is the worst case, since the saved file descriptors are pipes open
to the parent process.

In all the older Bash versions, the above command exits immediately
after receiving the contents of $!. However, in Bash on the devel
branch, the above command waits for the termination of the background
process. The issue doesn't happen without "eval".


The present behavior isn't consistent with older Bash versions. Also,
the above use of command substitution is typical. Although the
specific use of `eval' in this pattern may not be typical, I hit this
through a utility that receives an arbitrary string as a command and
starts it as a background process.

I think it's reasonable not to do this if the EXIT trap isn't going to
be executed.

--
``The lyf so short, the craft so long to lerne.'' - Chaucer
                 ``Ars longa, vita brevis'' - Hippocrates
Chet Ramey, UTech, CWRU    [email protected]    http://tiswww.cwru.edu/~chet/

Reply via email to