arodri7 has asked for the wisdom of the Perl Monks concerning the following question:
Please Monks, let me know what you think is the problem. I am not familiar with the fork process, so I don't know why the last child process is being repeated twice. Thanks#Get list of files from request_directory @request_files = <REQUESTS>; #start submitting jobs for the not_yet_run requests while (( $available_machine) && ($request_file_exists){ #this should be the parent process #read request file ($bling, $file, $Tool) = split(/~/, $request_file); open(REQ,"<$home/Input_Files/$request_file"); while (<REQ>){ $line = $_; #process each $line in the file to extract info that I #want } #Once I have extracted the information from the file #I want that to be the input to a child process #fork process to run SubmitToChi $child_id = fork; if ($child_id == 0){ #this is the child process #print STDERR "run $cmd on $request_file on $mach\n"; #run ChiSub using a remote shell (should I use #someth +ing else?) `rsh $mach $cmd $path $file $family $sub_family $seq_size $Tool`; + #these variables are my input to the child process } }
|
|---|
| Replies are listed 'Best First'. | |
|---|---|
|
Re: fork processes
by Aristotle (Chancellor) on Jun 05, 2002 at 10:03 UTC | |
by arodri7 (Initiate) on Jun 05, 2002 at 15:19 UTC | |
by arodri7 (Initiate) on Jun 05, 2002 at 16:43 UTC | |
|
Re: fork processes
by Aristotle (Chancellor) on Jun 05, 2002 at 16:46 UTC |