On Aug 31 2025, Maria wrote:

>       When I redirect the output of a command that sleeps into a process
>       substitution with a process that finishes immediately (like "echo" or
>       a process that doesn't exist), after the first sleep, Bash will crash
>       with exit code 141.

This is not a crash, it is normal behaviour in presence of a signal.
You can replace the shell command with any program that produces enough
output, you will get exactly the same behaviour.

$ yes > >(:); echo $?
141
$ yes | :; echo ${PIPESTATUS[*]}
141 0

(141 is 128 + SIGPIPE.)

-- 
Andreas Schwab, [email protected]
GPG Key fingerprint = 7578 EB47 D4E5 4D69 2510  2552 DF73 E780 A9DA AEC1
"And now for something completely different."

Reply via email to