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

Re: bug with eval, proc-subst and pipes

On Wed, 17 Jul 2013 23:50:25 -0400
Vin Shelton <acs@xxxxxxxxxxxxxxxxxxxx> wrote:
> "make check" now hangs and cannot be interrupted with ^C.

Ah.  I think it's this:

  outputfield2() {
    local -a args
    print $args[1]
    echo 'How sweet the moonlight sits upon the bank' >$args[2]
    print $args[3]
  outputfield2 muddy,>(sed -e s/s/th/g >outputfield2.txt),vesture

The shell is waiting for the sed to finish but it doesn't because its
input is still open, because we now don't close it until the job is
finished.  lsof seems to agree with me.

We're going to have to be quite smart about when we close output file
descriptors for process substitutions, because I think the problem we
saw before applies just as much to output as to input.

Will it be good enough to go through all process substitution output
file descriptors for a job when we enter zwaitjob() and close them?  I
think at that point nothing more can write from the main shell process,
and subprocesses in any case have to manage their own copies of the file


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