Beefy Boxes and Bandwidth Generously Provided by pair Networks
laziness, impatience, and hubris
 
PerlMonks  

Re: Forking Clients

by JavaFan (Canon)
on Oct 15, 2008 at 16:11 UTC ( [id://717256]=note: print w/replies, xml ) Need Help??


in reply to Forking Clients

Well, if that's your program, you could just print @resp from the children.

If the point is that the parent needs all the data from @resp, you could instead of doing a fork, do a pipe open (using '|-' or '-|' -- I always forget which one is which). Have the child processes write @resp to the pipe; the parent can use a select loop (or use IO::Select) and read from the pipe. Or you could use shared memory to pass the information back. Alternatively, you don't use subprocesses, but threads and share some variables.

Log In?
Username:
Password:

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

How do I use this?Last hourOther CB clients
Other Users?
Others perusing the Monastery: (3)
As of 2024-04-25 17:54 GMT
Sections?
Information?
Find Nodes?
Leftovers?
    Voting Booth?

    No recent polls found