CGI/Perl Guide | Learning Center | Forums | Advertise | Login
Site Search: in

  Main Index MAIN
Search Posts SEARCH
Who's Online WHO'S
Log in LOG

Home: Perl Programming Help: Intermediate:
Spawning Multiple Child Processes


New User

Jan 30, 2011, 9:57 AM

Post #1 of 3 (988 views)
Spawning Multiple Child Processes Can't Post

Is it possible to spawn 3 child processes (other scripts), let them run in parallel, have the parent wait until all are complete, read their output, and then have the parent continue processing?

To this group this may seem simple, but I have researched this and am stumped on how to do it.

fork() wants to re-run the parent script and seems only applicable to a single parent and a single child.

exec() doesn't return and complete execution.

system(), and backticks seem to wait until the child exits to continue, which ends up running the 3 child scripts sequentially instead of in parallel.

Any suggestions on how to do this would be GREATLY appreciated.


Veteran / Moderator

Jan 30, 2011, 1:18 PM

Post #2 of 3 (984 views)
Re: [kda406] Spawning Multiple Child Processes [In reply to] Can't Post

Parallel::ForkManager - A simple parallel processing fork manager

New User

Jan 30, 2011, 2:35 PM

Post #3 of 3 (977 views)
Re: [FishMonger] Spawning Multiple Child Processes [In reply to] Can't Post

That looks promising, and very much like what I was looking for. Thanks!


Search for (options) Powered by Gossamer Forum v.1.2.0

Web Applications & Managed Hosting Powered by Gossamer Threads
Visit our Mailing List Archives