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


Groups > gnu.bash.bug > #15462

Re: bash sets O_NONBLOCK on pts

Path csiph.com!goblin2!goblin1!goblin.stu.neva.ru!usenet.stanford.edu!not-for-mail
From achurch@achurch.org (Andrew Church)
Newsgroups gnu.bash.bug
Subject Re: bash sets O_NONBLOCK on pts
Date Thu, 03 Oct 2019 02:49:36 +0900
Lines 20
Approved bug-bash@gnu.org
Message-ID <mailman.787.1570038640.2651.bug-bash@gnu.org> (permalink)
References <CAGnkfhzCqfL03_Ox+awRvd2gmu+OQy4J8qbzQLiaO3sQgQcGqA@mail.gmail.com> <5d94e361.21745@msgid.achurch.org>
NNTP-Posting-Host lists.gnu.org
Content-Type text/plain; charset=utf-8
X-Trace usenet.stanford.edu 1570038640 12283 209.51.188.17 (2 Oct 2019 17:50:40 GMT)
X-Complaints-To action@cs.stanford.edu
Cc bug-bash@gnu.org
To mcroce@redhat.com
Envelope-to bug-bash@gnu.org
X-wmail-status normal
In-Reply-To <CAGnkfhzCqfL03_Ox+awRvd2gmu+OQy4J8qbzQLiaO3sQgQcGqA@mail.gmail.com>
X-Mailer MMail v5.51
X-detected-operating-system by eggs.gnu.org: GNU/Linux 2.2.x-3.x [generic] [fuzzy]
X-Received-From 60.39.233.218
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 <5d94e361.21745@msgid.achurch.org>
Xref csiph.com gnu.bash.bug:15462

Show key headers only | View raw


>Well, it's not so uncommon, I had it a few times. Reading on internet
>it seems that other users have it but don't notice it.

The fault could be in some other program accessing the terminal.  Bash
does not clear O_NONBLOCK on displaying a prompt, so if a previously
executed program sets O_NONBLOCK on stdin and then exits, that state
will remain until some other program unsets it.  For example:

$ cat >foo.c
#include <fcntl.h>
int main(void) {fcntl(0, F_SETFL, O_NONBLOCK); return 0;}
^D
$ cc foo.c
$ ./a.out
$ cat
cat: -: Resource temporarily unavailable

  --Andrew Church
    http://achurch.org/

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


Thread

Re: bash sets O_NONBLOCK on pts achurch@achurch.org (Andrew Church) - 2019-10-03 02:49 +0900

csiph-web