aboutsummaryrefslogtreecommitdiff
path: root/tests/runtests.pl
diff options
context:
space:
mode:
Diffstat (limited to 'tests/runtests.pl')
-rwxr-xr-xtests/runtests.pl7
1 files changed, 4 insertions, 3 deletions
diff --git a/tests/runtests.pl b/tests/runtests.pl
index e4a7b1071..a982dc712 100755
--- a/tests/runtests.pl
+++ b/tests/runtests.pl
@@ -249,9 +249,10 @@ sub startnew {
open(PID, "<$pidfile");
$pid2 = 0 + <PID>;
close(PID);
- if(kill(0, $pid2)) {
- # make sure this pid is alive, as otherwise it is just likely
- # to be the _previous_ pidfile or similar!
+ if($pid2 && kill(0, $pid2)) {
+ # if $pid2 is valid, then make sure this pid is alive, as
+ # otherwise it is just likely to be the _previous_ pidfile or
+ # similar!
last;
}
}