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


Groups > gnu.bash.bug > #15467

Re: bash sets O_NONBLOCK on pts

From Chet Ramey <chet.ramey@case.edu>
Newsgroups gnu.bash.bug
Subject Re: bash sets O_NONBLOCK on pts
Date 2019-10-03 13:58 -0400
Message-ID <mailman.890.1570125527.2651.bug-bash@gnu.org> (permalink)
References <CAGnkfhx6xvuhvfWYzy11xHt=qWg5We9GKLmj0fN6JhjGtov5rw@mail.gmail.com> <20191002153826.vgn3qbtztgulgyef@chaz.gmail.com> <5fae676d-5652-17e8-652f-b793e8e6b8e5@case.edu>

Show all headers | View raw


On 10/2/19 11:38 AM, Stephane Chazelas wrote:

> 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.

It's to make up for an old bug that's probably gone everywhere. Back
in the day, there were systems and services that would start interactive
shells without a controlling terminal. Opening and closing /dev/tty
forced the controlling terminal to be allocated.


-- 
``The lyf so short, the craft so long to lerne.'' - Chaucer
		 ``Ars longa, vita brevis'' - Hippocrates
Chet Ramey, UTech, CWRU    chet@case.edu    http://tiswww.cwru.edu/~chet/

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


Thread

Re: bash sets O_NONBLOCK on pts Chet Ramey <chet.ramey@case.edu> - 2019-10-03 13:58 -0400

csiph-web