On Feb 18, 2004, at 3:50 PM, Papo Napolitano wrote:

Hi!

I'm using the "select undef, undef, undef, 60" trick to sleep for 60
seconds.
But it seems to not work after I do a couple of forks like this:

while (1) {
  Fork('sub1');
  Fork('sub2');
  Fork('sub3');
  select undef, undef, undef, 60;

This can be simplified to:


sleep 60;

}

"Fork" just fork and run the supplied sub in the new child, returning to the
parent.
Any clue as to what could be causing this behaviour?

Let's see the Fork() subroutine please. I suspect the problem is there. You're forking multiple times inside an infinite loop, which is plenty scary. If you're not exiting child processes properly, that's going to get big fast.


James


-- To unsubscribe, e-mail: [EMAIL PROTECTED] For additional commands, e-mail: [EMAIL PROTECTED] <http://learn.perl.org/> <http://learn.perl.org/first-response>




Reply via email to