in reply to Re: fork processes
in thread fork processes

Sorry Screamer, I left the part where $available machines and $request_file_exists get updated. Before the code I had written, I check to see how many machines are available and put them in an array, as well as the $request_file_exists variable and as long as any of the two arrays are not empty (I left out the part where I use pop(@arrays) to update the variables) I keep going through the loop. But when I get to the last machine, it repeats its process twice. I update those variables in the "while" line. The code that I use to change the $variables is:
#start submitting jobs for the not_yet_run requests while (( $usable_machine = pop(@$usable) ) && ( $request_file = pop(@a +ll_requests) )){ #use the code I had before }
Let me know what ya think Thanks

Replies are listed 'Best First'.
Re: Re: Re: fork processes
by arodri7 (Initiate) on Jun 05, 2002 at 16:43 UTC
    I figured out why it was repeating the previous fork porcesses each time it looped. I had not closed the child process and it was creating zombies (I guess that is what is called). Thanks for the help