[Top][All Lists]

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

bash sets O_NONBLOCK on pts

From: Matteo Croce
Subject: bash sets O_NONBLOCK on pts
Date: Wed, 2 Oct 2019 14:27:48 +0200

Configuration Information [Automatically generated, do not change]:
Machine: x86_64
OS: linux-gnu
Compiler: gcc
Compilation CFLAGS: -O2 -g -pipe -Wall -Werror=format-security
-fstack-protector-strong -grecord-gcc-switches
-specs=/usr/lib/rpm/redhat/redhat-annobin-cc1 -m64 -mtune=generic
-fasynchronous-unwind-tables -fstack-clash-protection -fcf-protection
-Wno-parentheses -Wno-format-security
uname output: Linux mcroce-redhat 5.3.1-matteo #87 SMP Mon Sep 30
14:20:06 CEST 2019 x86_64 x86_64 x86_64 GNU/Linux
Machine Type: x86_64-redhat-linux-gnu

Bash Version: 5.0
Patch Level: 7
Release Status: release

Sometimes bash leaves the pts with O_NONBLOCK set, and all programs
reading from stdin will get an EAGAIN:

# cat
cat: -: Resource temporarily unavailable

# strace -e read cat
read(0, 0x7f2a70511000, 131072)         = -1 EAGAIN (Resource
temporarily unavailable)
: Resource temporarily unavailable
+++ exited with 1 +++

Initially I thought it was a kernel bug, so I filed a bug on the
kernel bugzilla:


but then I tested with fcntl() that the stding had te flag set.

random after some usage

`exec bash` resolves it

Matteo Croce
per aspera ad upstream

reply via email to

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