[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]
Re: bash sets O_NONBLOCK on pts
From: |
Andreas Schwab |
Subject: |
Re: bash sets O_NONBLOCK on pts |
Date: |
Wed, 02 Oct 2019 20:16:33 +0200 |
User-agent: |
Gnus/5.13 (Gnus v5.13) Emacs/26.3 (gnu/linux) |
On Okt 02 2019, Matteo Croce <mcroce@redhat.com> wrote:
> It seems to me that bash restores the flag, cat prints an error when not:
>
> $ cat
> $
>
> the same is not true if running multiple commands:
>
> $ ./foo; cat
> cat: -: Resource temporarily unavailable
> $
>
> Why this different behaviour?
Because it's reset immediately before reading the next line with
readline.
Andreas.
--
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."
Re: bash sets O_NONBLOCK on pts, Stephane Chazelas, 2019/10/02