Groups | Search | Server Info | Keyboard shortcuts | Login | Register [http] [https] [nntp] [nntps]
Groups > gnu.bash.bug > #15462 > unrolled thread
| Started by | achurch@achurch.org (Andrew Church) |
|---|---|
| First post | 2019-10-03 02:49 +0900 |
| Last post | 2019-10-03 02:49 +0900 |
| Articles | 1 — 1 participant |
Back to article view | Back to gnu.bash.bug
This discussion starts older than the indexed window; earlier articles aren't shown. The article labeled Started by
below is the oldest one visible, not the original post.
Re: bash sets O_NONBLOCK on pts achurch@achurch.org (Andrew Church) - 2019-10-03 02:49 +0900
| From | achurch@achurch.org (Andrew Church) |
|---|---|
| Date | 2019-10-03 02:49 +0900 |
| Subject | Re: bash sets O_NONBLOCK on pts |
| Message-ID | <mailman.787.1570038640.2651.bug-bash@gnu.org> |
>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 top | Article view | gnu.bash.bug
csiph-web