Configuration Information [Automatically generated, do not change]:
Machine: i686
OS: linux-gnu
Compiler: i686-pc-linux-gnu-gcc
Compilation CFLAGS: -DPROGRAM='bash' -DCONF_HOSTTYPE='i686'
-DCONF_OSTYPE='linux-gnu' -DCONF_MACHTYPE='i686-pc-linux-gnu'
-DCONF_VENDOR='pc' -DLOCALEDIR='/usr/share/locale' -DPACKAGE='bash' -DSHELL
-DHAVE_CONFIG_H -I. -I. -I./include -I./lib -g -O2 -mtune=pentium-m -pipe
uname output: Linux cerise 2.6.24.3 #2 SMP Thu Mar 27 10:43:06 GMT 2008 i686
GNU/Linux
Machine Type: i686-pc-linux-gnu
Bash Version: 3.2
Patch Level: 33
Release Status: release
Description:
If --noediting is used (e.g. for use with Emacs' shell-mode), and a
program run from bash sets O_NONBLOCK on bash's stdin, bash reads and
executes random garbags until it eventually segfaults.
Repeat-By:
bash --noediting
<any program which leaves the descriptor in non-blocking mode>
Fix:
The attached patch appears to fix the specific problem. However, I'm
still unclear as to how the original problem occurs. It looks as if
the errno != EINTR check should result in a busy-wait.