[Bug 1044466] Re: fails to write to coproc with "bad fd" from a compound command or subshell

Ivan Zakharyaschev 1044466 at bugs.launchpad.net
Fri Aug 31 16:51:42 UTC 2012


** Bug watch added: Debian Bug tracker #607079
   http://bugs.debian.org/cgi-bin/bugreport.cgi?bug=607079

** Also affects: bash (Debian) via
   http://bugs.debian.org/cgi-bin/bugreport.cgi?bug=607079
   Importance: Unknown
       Status: Unknown

** Bug watch added: Email to bug-bash at gnu #
   mailto:bug-bash at gnu.org

** Also affects: gnubash via
   mailto:bug-bash at gnu.org
   Importance: Undecided
       Status: New

-- 
You received this bug notification because you are a member of Ubuntu
Foundations Bugs, which is subscribed to bash in Ubuntu.
https://bugs.launchpad.net/bugs/1044466

Title:
  fails to write to coproc with "bad fd" from a compound command or
  subshell

Status in The GNU Bash Shell:
  New
Status in “bash” package in Ubuntu:
  New
Status in “bash” package in Debian:
  Unknown

Bug description:
  When redirecting to the fd connected to a coproc, bash fails with "bad
  file descriptor" message.

  The code is like this -- https://gitorious.org/rpush-cat/rpush-
  cat/blobs/continue-coproc/rpush-continue#line34 (mirror:
  http://repo.or.cz/w/rpush-cat.git/blob/refs/heads/continue-coproc
  :/rpush-continue#l34 ):

  coproc ssh "$@" -e none "ls -l $DEST && cat >> $DEST"

  DESTsize="$(readSizeAndroidls <&${COPROC[0]}- )" || exit $?
  SRCsize="$(ls -l "$SRC" | readSizeUnixls)"
  ( tail -c +$((DESTsize+1)) "$SRC" | pv --wait --size $((SRCsize-DESTsize)); ) >&${COPROC[1]}-

  ProblemType: Bug
  DistroRelease: Ubuntu 12.04
  Package: bash 4.2-2ubuntu2
  Uname: Linux 3.0.27-1-ac100 armv7l
  ApportVersion: 2.0.1-0ubuntu12
  Architecture: armhf
  Date: Sat Sep  1 03:40:04 2012
  SourcePackage: bash
  UpgradeStatus: No upgrade log present (probably fresh install)

To manage notifications about this bug go to:
https://bugs.launchpad.net/gnubash/+bug/1044466/+subscriptions




More information about the foundations-bugs mailing list