[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]
Re: Coproc usage ... not understanding
From: |
Chet Ramey |
Subject: |
Re: Coproc usage ... not understanding |
Date: |
Tue, 09 Aug 2011 20:50:01 -0400 |
User-agent: |
Mozilla/5.0 (Macintosh; U; Intel Mac OS X 10.6; en-US; rv:1.9.2.18) Gecko/20110616 Lightning/1.0b2 Thunderbird/3.1.11 |
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.
--
``The lyf so short, the craft so long to lerne.'' - Chaucer
``Ars longa, vita brevis'' - Hippocrates
Chet Ramey, ITS, CWRU chet@case.edu http://cnswww.cns.cwru.edu/~chet/