[Top][All Lists]

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

Re: bash sets O_NONBLOCK on pts

From: Chet Ramey
Subject: Re: bash sets O_NONBLOCK on pts
Date: Thu, 3 Oct 2019 13:58:40 -0400
User-agent: Mozilla/5.0 (Macintosh; Intel Mac OS X 10.14; rv:60.0) Gecko/20100101 Thunderbird/60.9.0

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    address@hidden    http://tiswww.cwru.edu/~chet/

reply via email to

[Prev in Thread] Current Thread [Next in Thread]