mirror of
https://github.com/curl/curl.git
synced 2026-06-03 17:44:17 +03:00
make 'checkdied' in runtests.pl more robust
This commit is contained in:
parent
3daa54d636
commit
5b809a3104
1 changed files with 4 additions and 1 deletions
|
|
@ -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;
|
||||
}
|
||||
|
||||
#######################################################################
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue