[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]
Bad file descriptor with coproc and pipe
From: |
Michal Sojka |
Subject: |
Bad file descriptor with coproc and pipe |
Date: |
Tue, 04 Feb 2014 08:34:37 +0100 |
Configuration Information [Automatically generated, do not change]:
Machine: x86_64
OS: linux-gnu
Compiler: gcc
Compilation CFLAGS: -DPROGRAM='bash' -DCONF_HOSTTYPE='x86_64'
-DCONF_OSTYPE='linux-gnu' -DCONF_MACHTYPE='x86_64-pc-linux-gnu'
-DCONF_VENDOR='pc' -DLOCALEDIR='/usr/share/locale' -DPACKAGE='bash' -DSHELL
-DHAVE_CONFIG_H -I. -I../bash -I../bash/include -I../bash/lib
-D_FORTIFY_SOURCE=2 -g -O2 -fstack-protector --param=ssp-buffer-size=4 -Wformat
-Werror=format-security -Wall
uname output: Linux steelpick 3.12-1-amd64 #1 SMP Debian 3.12.6-2 (2013-12-29)
x86_64 GNU/Linux
Machine Type: x86_64-pc-linux-gnu
Bash Version: 4.2
Patch Level: 45
Release Status: release
Description:
The following commands fail:
coproc while true; do echo $RANDOM; done
cat <&${COPROC[0]} | cat
The resulting error message is:
bash: ${COPROC[0]}: Bad file descriptor
The following commands (without the pipe) work as expected,
i.e. the output of the coprocess is shown.
coproc while true; do echo $RANDOM; done
cat <&${COPROC[0]}
Thanks,
-Michal
- Bad file descriptor with coproc and pipe,
Michal Sojka <=