seaver has asked for the wisdom of the Perl Monks concerning the following question:
I'm writing a script that iteratively runs a command on many small filess and reaps the output. The commands each take 1-2 seconds to run, and for the most part, this works. However, there's one particular instance where if I use a particular input file, then waitpid() stalls.
The command itself runs fine with that particular file in bash, and I'm aware that I can use WNOHANG to prevent waitpid from causing the script itself to stop, but I'm struggling to understand why waitpid() stalls at the same file each time.
The (incomplete) section of code I'm using is:
my $cmd = "blastp -query ".$TmpDir."/".$count.".fasta -db ".$Dir."/".$ +count.".db -outfmt 6"; $pid=open3($wtr, $rdr, $err, $cmd); waitpid($pid, 0);
|
|---|
| Replies are listed 'Best First'. | |
|---|---|
|
Re: waitpid stalling on one particular file
by salva (Canon) on Sep 25, 2014 at 07:04 UTC | |
by seaver (Pilgrim) on Sep 25, 2014 at 16:03 UTC | |
by salva (Canon) on Sep 25, 2014 at 16:16 UTC | |
by seaver (Pilgrim) on Sep 25, 2014 at 17:17 UTC | |
by salva (Canon) on Sep 25, 2014 at 19:41 UTC |