[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]
Re: bug in bash
From: |
Andreas Schwab |
Subject: |
Re: bug in bash |
Date: |
Sun, 12 May 2024 15:33:12 +0200 |
User-agent: |
Gnus/5.13 (Gnus v5.13) |
On Mai 12 2024, Greg Wooledge wrote:
> On Sun, May 12, 2024 at 03:55:21AM +0200, Quốc Trị Đỗ wrote:
>> I found a bug when i tried with syntax <(cmd). this is an example
>> cat <(wc -l) < bk
>
> What is "wc -l" supposed to read from? It counts lines of standard input,
> until EOF is reached. But its standard input is a terminal. And you're
> running it as a background process.
>
> I would *expect* this command to fail with an error message of some
> kind, because a background process shouldn't be allowed to read
> input from a terminal.
Since the redirection fails and the cat command is never started, bash
doesn't switch the terminal process group, and the background wc command
goes on competing with bash for the terminal.
--
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."
- bug in bash, Quốc Trị Đỗ, 2024/05/12
- Re: bug in bash, Andreas Kähäri, 2024/05/12
- Re: bug in bash, Kerin Millar, 2024/05/12
- Re: bug in bash, Greg Wooledge, 2024/05/12
- Re: bug in bash,
Andreas Schwab <=
- Re: bug in bash, Oğuz, 2024/05/12
- Re: bug in bash, Chet Ramey, 2024/05/13
- Re: bug in bash, Oğuz, 2024/05/13
- Re: bug in bash, Chet Ramey, 2024/05/14
- Re: bug in bash, Andreas Schwab, 2024/05/14
- Re: bug in bash, Chet Ramey, 2024/05/14
- Re: bug in bash, Chet Ramey, 2024/05/14