The following perl code was running through a Python script.
my $pid = fork;
my @pids;
if ($pid) {
push(@pids, $pid);
$return_code = system($command);
}
foreach my $pid (@pids) {
waitpid($pid, 0);
}
$return_code = $return_code >> 8;
return $return_code;
This $return_code was 0 even though the $command ran for next 5 minutes.
This happened only once. I could not reproduce this later. Could anyone identify what possibly caused this issue? The $command will invoke several perl threads.
I don't know how you're calling perl from python but I am assuming you're using subprocess module