diff --git a/src/test/perl/PostgreSQL/Test/Cluster.pm b/src/test/perl/PostgreSQL/Test/Cluster.pm index 6101740ca0..7411188dc8 100644 --- a/src/test/perl/PostgreSQL/Test/Cluster.pm +++ b/src/test/perl/PostgreSQL/Test/Cluster.pm @@ -1593,7 +1593,7 @@ sub _reserve_port # take an exclusive lock to avoid concurrent access flock($portfile, LOCK_EX) || die "locking port file $filename: $!"; # see if someone else has or had a reservation of this port - my $pid = <$portfile>; + my $pid = <$portfile> || "0"; chomp $pid; if ($pid +0 > 0) {