Welcome to WebmasterWorld Guest from 54.196.245.74

Forum Moderators: bakedjake

Message Too Old, No Replies

concurrent processes

concurrent processes

     
4:22 am on Nov 29, 2008 (gmt 0)

New User

5+ Year Member

joined:June 28, 2008
posts: 39
votes: 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

10:18 pm on Nov 29, 2008 (gmt 0)

New User

5+ Year Member

joined:June 28, 2008
posts: 39
votes: 0


nevermind. I found bash wait :)
 

Join The Conversation

Moderators and Top Contributors

Hot Threads This Week

Featured Threads

Free SEO Tools

Hire Expert Members