help-bash
[Top][All Lists]
Advanced

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

coprocesses *can* be more than one at a time


From: Nikolaos Kakouros
Subject: coprocesses *can* be more than one at a time
Date: Mon, 30 Jan 2023 01:39:26 +0000

The man page for bash ends with the following sentence:

    There may be only one active coprocess at a time.

This (I assume) refers to `coproc`-created processes. But running the following 
does not result in error, only in a warning:

    for i in {1..2}; do coproc test$i { for j in {1..4}; do echo "message from 
$i" >&2; sleep 1; done; }; done

The messages are printed fine in stderr, the `$test1_PID`, `$test1`, 
`$test2_PID` and `$test2` variables are all correctly set and the warning says:

    bash: warning: execute_coproc: coproc [3087474:test1] still exists

Is the `may` in the man page quote meant to imply a warning instead of an error 
or should that quote be removed/rephrased? Also, what is the risk the warning 
is warning the user about?


reply via email to

[Prev in Thread] Current Thread [Next in Thread]