HI. First time poster... :)
 
I am trying to write a script that spawns a number of children processes.
The number of children processes is determined at run time based on a
configuration file. I am having trouble finding a way to create these
children processes. They have to be independant of the parent and all run
simultaniously untill they have completed their job or the parent send them
a terminate signal.
 
The fork command appears to only create a single child process. I may need
potentially 20 or more.
 
Backticks and the system() command will not work because the parent process
waits for the child to complete before continuing.
 
I'm hoping I can somehow embed a fork command inside a while loop like so:
 
$children = 10;
while ($children > 0)
{
    # fork a child process here somehow...
    $children--;
}
 
Thanks,
Brian

Reply via email to