Groups | Search | Server Info | Keyboard shortcuts | Login | Register [http] [https] [nntp] [nntps]
Groups > gnu.bash.bug > #15468
| Path | csiph.com!3.us.feeder.erje.net!feeder.erje.net!news.snarked.org!news.linkpendium.com!news.linkpendium.com!panix!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 | Thu, 3 Oct 2019 19:23:00 +0100 |
| Lines | 29 |
| Approved | bug-bash@gnu.org |
| Message-ID | <mailman.899.1570127117.2651.bug-bash@gnu.org> (permalink) |
| References | <CAGnkfhx6xvuhvfWYzy11xHt=qWg5We9GKLmj0fN6JhjGtov5rw@mail.gmail.com> <20191002153826.vgn3qbtztgulgyef@chaz.gmail.com> <5fae676d-5652-17e8-652f-b793e8e6b8e5@case.edu> <20191003182300.cghzq7wvjfdlw5a7@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 1570127118 3297 209.51.188.17 (3 Oct 2019 18:25:18 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 | <5fae676d-5652-17e8-652f-b793e8e6b8e5@case.edu> |
| 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 | <20191003182300.cghzq7wvjfdlw5a7@chaz.gmail.com> |
| X-Mailman-Original-References | <CAGnkfhx6xvuhvfWYzy11xHt=qWg5We9GKLmj0fN6JhjGtov5rw@mail.gmail.com> <20191002153826.vgn3qbtztgulgyef@chaz.gmail.com> <5fae676d-5652-17e8-652f-b793e8e6b8e5@case.edu> |
| Xref | csiph.com gnu.bash.bug:15468 |
Show key headers only | View raw
2019-10-03 13:58:40 -0400, Chet Ramey: > 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. [...] Thanks. I suspected it may be something like that. Though I thought, without actually double-checking it, that the rest of the code would end up opening the terminal device (without O_NOCTTY) anyway. It may be worth adding a comment to document that purpose of the function, and maybe rename it to something like control_tty_if_not_already_controlled or something that more accurately describes its intent. -- Stephane
Back to gnu.bash.bug | Previous | Next | Find similar | Unroll thread
Re: bash sets O_NONBLOCK on pts Stephane Chazelas <stephane.chazelas@gmail.com> - 2019-10-03 19:23 +0100
csiph-web