aboutsummaryrefslogtreecommitdiff
diff options
context:
space:
mode:
-rwxr-xr-xtests/runtests.pl5
1 files changed, 4 insertions, 1 deletions
diff --git a/tests/runtests.pl b/tests/runtests.pl
index f2ed1650d..9e5a8674c 100755
--- a/tests/runtests.pl
+++ b/tests/runtests.pl
@@ -258,8 +258,11 @@ $ENV{'CURL_CA_BUNDLE'}=undef;
sub checkdied {
use POSIX ":sys_wait_h";
my $pid = $_[0];
+ if(not defined $pid || $pid <= 0) {
+ return 0;
+ }
my $rc = waitpid($pid, &WNOHANG);
- return $rc == $pid;
+ return ($rc == $pid)?1:0;
}
#######################################################################