Zsh Mailing List Archive
Messages sorted by: Reverse Date, Date, Thread, Author

Shell exits on bad coproc redirection

This affects 3.0.8 and 4.0.1 as well as 4.1.0-dev-1, but NOT 3.0.6.

schaefer[503] Src/zsh -f
zagzig% echo $ZSH_VERSION
zagzig% print >&p
zsh: coprocess: bad file descriptor
zagzig% coproc sleep 1
[1] 14033
[1]  + done       sleep 1
zagzig% print >&p
schaefer[504] echo $?

So the shell is dying of a SIGPIPE.

The problem seems to be a combination of these two items (ChangeLog-3.1):

1999-10-10  Bart Schaefer  <schaefer@xxxxxxx>

        * Src/exec.c: Plug lead of a copy of the coproc input descriptor.

(ahem, that should say "leak").

Sun May 18 18:57:08 1997  Zolt<E1>n Hidv<E9>gi  <hzoli@xxxxxxxxxx>

        * Src/builtin.c, Src/exec.c, Src/init.c, Src/signals.c, Src/jobs.c:
          Do not handle SIGPIPE specially for shells with job control

Anybody remember why we stopped handling SIGPIPE?  Is Zoltan still out there

Bart Schaefer                                 Brass Lantern Enterprises
http://www.well.com/user/barts              http://www.brasslantern.com

Zsh: http://www.zsh.org | PHPerl Project: http://phperl.sourceforge.net   

Messages sorted by: Reverse Date, Date, Thread, Author