in reply to Fork novice requests help...Part Deux

What are you confused about concerning waitpid? The syntax is merely:
if(my $pid = fork()) { #parent doParentStuff(); } elsif defined $pid { #child doChildStuff(); exit; } waitpid $pid, 0; #wait for child process to exit before going on in pa +rent doMoreParentStuff();
Could you be more specific with your problem?

Jeremy

Replies are listed 'Best First'.
Re: Re: Fork novice requests help...Part Deux
by thor (Priest) on Jun 21, 2001 at 02:12 UTC
    I'll try to explain myself better. What I want to do is this:

    1) foreach file that I have in the list, kick off the appropriate number of children
    2) wait for all of the children to return before I move on to the next file.

    It is the waiting for all of the children to return that is getting me. Maybe I'm just thinking to linearly about this...