From: Andrew Dunstan Date: Wed, 23 Nov 2022 12:03:06 +0000 (-0500) Subject: Fix perl warning from commit 9b4eafcaf4 X-Git-Tag: REL_16_BETA1~1254 X-Git-Url: http://git.postgresql.org/gitweb/?a=commitdiff_plain;h=b425bf0081386a544e1faf872a75da69a971e173;p=postgresql.git Fix perl warning from commit 9b4eafcaf4 per gripe from Andres Freund and Tom Lane Backpatch to all live branches. --- diff --git a/src/test/perl/PostgreSQL/Test/Cluster.pm b/src/test/perl/PostgreSQL/Test/Cluster.pm index 6101740ca0a..7411188dc87 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) {