Skip to content

Commit

Permalink
runtests: Fix pid check in checkdied
Browse files Browse the repository at this point in the history
Because the 'not' operator has a very low precedence and as a result the
entire statement was erroneously negated and could never be true.
  • Loading branch information
jay committed Sep 30, 2015
1 parent 8fd190c commit c6ff538
Showing 1 changed file with 1 addition and 1 deletion.
2 changes: 1 addition & 1 deletion tests/runtests.pl
Expand Up @@ -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);
Expand Down

0 comments on commit c6ff538

Please sign in to comment.