On Thu, Dec 06, 2001 at 05:20:05PM -0500, Jason Boxman wrote: > On Thursday 06 December 2001 04:02 pm, you wrote: > > How should I detect EOF on the stdout from POE::Wheel::Run? > > > > SIGCHLD seems to come well before the last StdoutEvent, buffering > > I expect. I also see two ErrorEvents (ARG0='read', ARG1=0). One > > soon after the SIGCHLD and another after the last StdoutEvent. > > Yeah, I get something like that with my POE::Wheel. Sometimes I don't get > all the data from the STDOUT pipe before it finishes up and goes away. I > actually resorted to using a sleep 2; call in my Wheel's executed coderef, > but that's surely a kludge.
This should be fixed in 0.17 or later, although it may not be if you're deleting the Wheel::Run instance before the pipes can be flushed. It would be best to have Wheel::Run track the pipes' status and emitting a "hey, close me" event when it's done. -- Rocco Caputo / [EMAIL PROTECTED] / poe.perl.org / poe.sourceforge.net
