bug-bash
[Top][All Lists]
Advanced

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

Re: Bash exits with "Broken pipe" with process subsitution and sleep


From: Andreas Schwab
Subject: Re: Bash exits with "Broken pipe" with process subsitution and sleep
Date: Sun, 31 Aug 2025 22:24:36 +0200
User-agent: Gnus/5.13 (Gnus v5.13)

On Aug 31 2025, G. Branden Robinson wrote:

> At 2025-08-31T19:20:58+0000, Maria wrote:
>>>> for i in 1 2 3 4 5; do sleep 1; echo $i; done > >(echo)
>
>> I tried the input you provided, and indeed it is just the subprocess
>> that exits, but with my input, it is Bash itself that exits, not the
>> subprocess.
>
> I wonder if the `lastpipe` shell option is implicated.

This is not a pipeline, but a normal redirection (though the process
substitution procuces a file that is connected to a pipe, thus behaves
like a pipeline).

-- 
Andreas Schwab, schwab@linux-m68k.org
GPG Key fingerprint = 7578 EB47 D4E5 4D69 2510  2552 DF73 E780 A9DA AEC1
"And now for something completely different."



reply via email to

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