|
From: | Linda Walsh |
Subject: | Re: Coproc usage ... not understanding |
Date: | Tue, 09 Aug 2011 17:19:28 -0700 |
User-agent: | Mozilla/5.0 (Windows; U; Windows NT 6.0; en-US; rv:1.8.1.24) Gecko/20100228 Thunderbird/2.0.0.24 Mnenhy/0.7.6.666 |
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 handlesto the child in COPROCNAME[0/1], does the child have a copy of that as well?
I.e. does it retain an 'unclosed' copy of the writeable end of it's inputpipe?
(and same for output, but not as important...i.e. it could also read from some handle it owns to read it's own output...(like that would useful)...).But the 1st case is a cause for concern -- if it doesn't close out the writeable end of the pipe to it's input, then even if the parent closes it's handles, the child won't ever see "EOF", as it has it's own writeable-handle to it's input stream.
??
[Prev in Thread] | Current Thread | [Next in Thread] |