summaryrefslogtreecommitdiff
path: root/bin/Process_Unix.pm
diff options
context:
space:
mode:
Diffstat (limited to 'bin/Process_Unix.pm')
-rw-r--r--bin/Process_Unix.pm6
1 files changed, 3 insertions, 3 deletions
diff --git a/bin/Process_Unix.pm b/bin/Process_Unix.pm
index e4d983a80a7..11463630bbf 100644
--- a/bin/Process_Unix.pm
+++ b/bin/Process_Unix.pm
@@ -3,7 +3,7 @@ package Process;
$EXE_EXT = "";
-use POSIX ":sys_wait_h";
+use POSIX "sys_wait_h";
sub Create
{
@@ -63,8 +63,8 @@ sub TimedWait
my $self = shift;
my $maxtime = shift;
while ($maxtime-- != 0) {
- waitpid ($self->[0], WNOHANG);
- if ($? != -1) {
+ my $pid = waitpid ($self->[0], &WNOHANG);
+ if ($pid != 0 && $? != -1) {
return $?;
}
sleep 1;