Chet Ramey wrote:
On 8/9/11 8:19 PM, Linda Walsh wrote:
Linda Walsh wrote:
    I did think of that...but I thought when the foreground
process closes 'input', then all of the chained utils should see 'eof', and
should then flush their output...at least that was my belief in how they
"should" be working...(sigh)...
---
    Um...that got me to thinking..

    When you spawn off the coproc, and the parent has the I/O handles
to the child in COPROCNAME[0/1],   does the child have a copy of that as well?

The parent and child retain the appropriate ends of the pipe and close
the others.  The parent's copies are set close-on-exec.  Maybe that's the
problem.

In the parent, I used
exec "${parselast[1]}>&-"
shouldn't that have closed that last write-handle to the child?

(just before that, I did a "0<&${parselast[0]} cat & ", which I now realize
would have duped the handle I was trying to close, but if you set close-on-exec,
it shouldn't have been a prob....hmmmm...puzzlement!)



Reply via email to