]> granicus.if.org Git - curl/commitdiff
runtests: Fix pid check in checkdied
authorJay Satiro <raysatiro@yahoo.com>
Wed, 30 Sep 2015 02:08:57 +0000 (22:08 -0400)
committerJay Satiro <raysatiro@yahoo.com>
Wed, 30 Sep 2015 02:08:57 +0000 (22:08 -0400)
Because the 'not' operator has a very low precedence and as a result the
entire statement was erroneously negated and could never be true.

tests/runtests.pl

index 377d733c719e3aa63cf6fadd0dc2a0277bdfcca7..77ec672d913f7c3af990a2d7baa1ffaefadbfdf8 100755 (executable)
@@ -397,7 +397,7 @@ sub init_serverpidfile_hash {
 sub checkdied {
     use POSIX ":sys_wait_h";
     my $pid = $_[0];
-    if(not defined $pid || $pid <= 0) {
+    if((not defined $pid) || $pid <= 0) {
         return 0;
     }
     my $rc = waitpid($pid, &WNOHANG);