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


Groups > gnu.bash.bug > #15460

Re: bash sets O_NONBLOCK on pts

Path csiph.com!goblin2!goblin1!goblin.stu.neva.ru!usenet.stanford.edu!not-for-mail
From Stephane Chazelas <stephane.chazelas@gmail.com>
Newsgroups gnu.bash.bug
Subject Re: bash sets O_NONBLOCK on pts
Date Wed, 2 Oct 2019 16:38:26 +0100
Lines 38
Approved bug-bash@gnu.org
Message-ID <mailman.779.1570030819.2651.bug-bash@gnu.org> (permalink)
References <CAGnkfhx6xvuhvfWYzy11xHt=qWg5We9GKLmj0fN6JhjGtov5rw@mail.gmail.com> <20191002153826.vgn3qbtztgulgyef@chaz.gmail.com>
NNTP-Posting-Host lists.gnu.org
Mime-Version 1.0
Content-Type text/plain; charset=us-ascii
X-Trace usenet.stanford.edu 1570030819 7280 209.51.188.17 (2 Oct 2019 15:40:19 GMT)
X-Complaints-To action@cs.stanford.edu
To bug-bash@gnu.org
Envelope-to bug-bash@gnu.org
X-Injected-Via-Gmane http://gmane.org/
User-Agent NeoMutt/20171215
Content-Disposition inline
In-Reply-To <CAGnkfhx6xvuhvfWYzy11xHt=qWg5We9GKLmj0fN6JhjGtov5rw@mail.gmail.com>
X-detected-operating-system by eggs.gnu.org: GNU/Linux 2.2.x-3.x [generic] [fuzzy]
X-Received-From 195.159.176.226
X-BeenThere bug-bash@gnu.org
X-Mailman-Version 2.1.23
Precedence list
List-Id Bug reports for the GNU Bourne Again SHell <bug-bash.gnu.org>
List-Unsubscribe <https://lists.gnu.org/mailman/options/bug-bash>, <mailto:bug-bash-request@gnu.org?subject=unsubscribe>
List-Archive <https://lists.gnu.org/archive/html/bug-bash>
List-Post <mailto:bug-bash@gnu.org>
List-Help <mailto:bug-bash-request@gnu.org?subject=help>
List-Subscribe <https://lists.gnu.org/mailman/listinfo/bug-bash>, <mailto:bug-bash-request@gnu.org?subject=subscribe>
X-Mailman-Original-Message-ID <20191002153826.vgn3qbtztgulgyef@chaz.gmail.com>
X-Mailman-Original-References <CAGnkfhx6xvuhvfWYzy11xHt=qWg5We9GKLmj0fN6JhjGtov5rw@mail.gmail.com>
Xref csiph.com gnu.bash.bug:15460

Show key headers only | View raw


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

Back to gnu.bash.bug | Previous | Next | Find similar | Unroll thread


Thread

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

csiph-web