Groups | Search | Server Info | Keyboard shortcuts | Login | Register [http] [https] [nntp] [nntps]


Groups > gnu.bash.bug > #15460 > unrolled thread

Re: bash sets O_NONBLOCK on pts

Started byStephane Chazelas <stephane.chazelas@gmail.com>
First post2019-10-02 16:38 +0100
Last post2019-10-02 16:38 +0100
Articles 1 — 1 participant

Back to article view | Back to gnu.bash.bug

This discussion starts older than the indexed window; earlier articles aren't shown. The article labeled Started by below is the oldest one visible, not the original post.


Contents

  Re: bash sets O_NONBLOCK on pts Stephane Chazelas <stephane.chazelas@gmail.com> - 2019-10-02 16:38 +0100

#15460 — Re: bash sets O_NONBLOCK on pts

FromStephane Chazelas <stephane.chazelas@gmail.com>
Date2019-10-02 16:38 +0100
SubjectRe: bash sets O_NONBLOCK on pts
Message-ID<mailman.779.1570030819.2651.bug-bash@gnu.org>
2019-10-02 14:27:48 +0200, Matteo Croce:
[...]
> Sometimes bash leaves the pts with O_NONBLOCK set, and all programs
> reading from stdin will get an EAGAIN:
[...]

Can you reproduce it with

   bash --norc

Or with:

   INPUTRC=/dev/null bash --norc

?

If you could reproduce it with:

   strace -o strace.log bash --norc

that would allow us to see where a O_NONBLOCK flag is set and
not reset.

BTW, what's the point of the check_dev_tty() function? It seems
it just attempts to open the tty (the controlling one or the one
open on stdin), closes it, but doesn't return anything about the
success of failure in doing so.

On my system (Debian amd64, 5.0.3(1)-release, bash started from
a regular terminal emulator), it's the only place where I see
O_NONBLOCK being used (and that's on a new fd that is closed
straight after, so it could not have any bearing on the OP's
issue).

-- 
Stephane

[toc] | [standalone]


Back to top | Article view | gnu.bash.bug


csiph-web