homepage Welcome to WebmasterWorld Guest from 184.73.104.82
register, free tools, login, search, pro membership, help, library, announcements, recent posts, open posts,
Pubcon Platinum Sponsor 2014
Home / Forums Index / Hardware and OS Related Technologies / Linux, Unix, and *nix like Operating Systems
Forum Library, Charter, Moderators: bakedjake

Linux, Unix, and *nix like Operating Systems Forum

    
concurrent processes
concurrent processes
homeless

5+ Year Member



 
Msg#: 3796421 posted 4:22 am on Nov 29, 2008 (gmt 0)

I have a php script that spawns another script approx 30 times with different args. I'm running the spawned scipt in background and everything seems fine.

My question: Is there a way to cause the main script to wait on the spawned processes to complete before it moves to the next step or completion?

script1
loop
exec("/blah/blah/script2.cgi arg* >/dev/null &");
end loop

code to run after spawned processes have completed
.
.
.
end script1

 

homeless

5+ Year Member



 
Msg#: 3796421 posted 10:18 pm on Nov 29, 2008 (gmt 0)

nevermind. I found bash wait :)

Global Options:
 top home search open messages active posts  
 

Home / Forums Index / Hardware and OS Related Technologies / Linux, Unix, and *nix like Operating Systems
rss feed

All trademarks and copyrights held by respective owners. Member comments are owned by the poster.
Home ¦ Free Tools ¦ Terms of Service ¦ Privacy Policy ¦ Report Problem ¦ About ¦ Library ¦ Newsletter
WebmasterWorld is a Developer Shed Community owned by Jim Boykin.
© Webmaster World 1996-2014 all rights reserved