Re: POE::Wheel::Run and missing CloseEvent

2002-09-09 Thread Peter Chen

On Sun, 2002-09-08 at 14:14, Rocco Caputo wrote:
 Please try http://poe.dynodns.net/~troc/tmp/peter-chen-wheel-run.perl
 (temporary URL on my dial-up machine), or you can use it as the base
 for your own test case.
 
 I still can't reproduce the problem here, even with that running for
 almost 15 minutes (6300 child processes).  Maybe it's something
 specific to your runtime environment?

Thank you.  I shall try this.

Pete





Re: POE::Wheel::Run and missing CloseEvent

2002-09-08 Thread Rocco Caputo

On Thu, Aug 29, 2002 at 03:39:36PM -0400, Peter Chen wrote:
 On Thu, 2002-08-29 at 13:40, Rocco Caputo wrote:
  I haven't, but I don't use POE::Wheel::Run as much as you do.  Is it
  possible that occasionally the SIGCHLD is being delivered before the
  STDOUT/STDERR pipes close, so the wheel is being destroyed before it
  can emit a CloseEvent?
 
 I did check for that.  As you have guessed, some of my applications make
 heavy use of this, so I am explicit about the conditions in which a
 Wheel::Run is considered done and can be deleted.  In this particular
 instance, I only delete a wheel when both sigchild and CloseEvent are
 received.  As I mentioned before, 99% of the time this works perfectly. 
 Yet I have a few reproducible cases where a CloseEvent is never emitted.
 
 Even though presently I have a workaround, at some point, I will have to
 track this down.  This reminds me of another idea that we were bouncing
 around, having a component to manage the states for Wheel::Run.

I forgot to ask: Which form of child process are you executing?

  Program = shell command
  Program = \@shell_command
  Program = \function

-- Rocco Caputo / [EMAIL PROTECTED] / poe.perl.org / poe.sf.net



Re: POE::Wheel::Run and missing CloseEvent

2002-08-29 Thread Rocco Caputo

On Mon, Aug 26, 2002 at 06:46:14PM -0400, Peter Chen wrote:
 Does POE::Wheel::Run always emit a CloseEvent?
 
 I have encountered a strange situation where POE::Wheel::Run seems to
 omit emitting a CloseEvent.  This happens when I do a rpm -Uvv
 --percent with a bunch of rpm's.  Most of the time this works just
 fine, but occasionally the CloseEvent never appears.  This of course
 turns up as a sporadic bug, since I am using both sigchild and
 CloseEvent to indicate that the process has completed and there is no
 more output.
 
 Has anybody else seen this?  TIA.

I haven't, but I don't use POE::Wheel::Run as much as you do.  Is it
possible that occasionally the SIGCHLD is being delivered before the
STDOUT/STDERR pipes close, so the wheel is being destroyed before it
can emit a CloseEvent?

-- Rocco Caputo / [EMAIL PROTECTED] / poe.perl.org / poe.sf.net



Re: POE::Wheel::Run and missing CloseEvent

2002-08-29 Thread Peter Chen

On Thu, 2002-08-29 at 13:40, Rocco Caputo wrote:
 I haven't, but I don't use POE::Wheel::Run as much as you do.  Is it
 possible that occasionally the SIGCHLD is being delivered before the
 STDOUT/STDERR pipes close, so the wheel is being destroyed before it
 can emit a CloseEvent?

I did check for that.  As you have guessed, some of my applications make
heavy use of this, so I am explicit about the conditions in which a
Wheel::Run is considered done and can be deleted.  In this particular
instance, I only delete a wheel when both sigchild and CloseEvent are
received.  As I mentioned before, 99% of the time this works perfectly. 
Yet I have a few reproducible cases where a CloseEvent is never emitted.

Even though presently I have a workaround, at some point, I will have to
track this down.  This reminds me of another idea that we were bouncing
around, having a component to manage the states for Wheel::Run.

Pete