Beefy Boxes and Bandwidth Generously Provided by pair Networks
Problems? Is your data what you think it is?
 
PerlMonks  

Re^2: While loop not exiting when expected.

by BazB (Priest)
on Jun 25, 2004 at 10:22 UTC ( #369588=note: print w/ replies, xml ) Need Help??


in reply to Re: While loop not exiting when expected.
in thread While loop not exiting when expected.

broquaint, thanks.
I am aware of Parallel::ForkManager, but I figured it wasn't worth the grief of installing an extra module for a relatively small amount of code.

Of course, that was before I realised my code wasn't playing nice...

Update: I've tried broquaint's suggestion of Parallel::ForkManager, and that suffers from the same problem on Solaris (5.6.1 and 5.8.4), but is fine on Linux.

Update 2: I tried another tactic - don't read the configuration file and fork children in a single loop.
Instead, I open and read the configuration file and store the information in an array, then iterate over the array using foreach, kicking off children and reaping as before.
This approach does work correctly, but still doesn't reveal why the original code fails.


If the information in this post is inaccurate, or just plain wrong, don't just downvote - please post explaining what's wrong.
That way everyone learns.


Comment on Re^2: While loop not exiting when expected.
Download Code

Log In?
Username:
Password:

What's my password?
Create A New User
Node Status?
node history
Node Type: note [id://369588]
help
Chatterbox?
and the web crawler heard nothing...

How do I use this? | Other CB clients
Other Users?
Others rifling through the Monastery: (6)
As of 2014-07-29 00:47 GMT
Sections?
Information?
Find Nodes?
Leftovers?
    Voting Booth?

    My favorite superfluous repetitious redundant duplicative phrase is:









    Results (211 votes), past polls