postgres.git / summary / log / commit / refs
commit 2c0d0ee761551582c9cd3727d444b7408aa82db7
Author: Andrew Dunstan <andrew@dunslane.net>
Date: Wed Nov 23 12:03:06 2022 +0000
First released in: 16.0, 11.19, 12.14, 13.10, 14.7, 15.2
Fix perl warning from commit 9b4eafcaf4
per gripe from Andres Freund and Tom Lane
Backpatch to all live branches.
src/test/perl/PostgreSQL/Test/Cluster.pm | 2 +-
1 file changed, 1 insertion(+), 1 deletion(-)
diff --git a/src/test/perl/PostgreSQL/Test/Cluster.pm b/src/test/perl/PostgreSQL/Test/Cluster.pm
index cae3a960f66..69a8ff3d743 100644
--- a/src/test/perl/PostgreSQL/Test/Cluster.pm
+++ b/src/test/perl/PostgreSQL/Test/Cluster.pm
@@ -1592,7 +1592,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)
{
[parent: 2debceed2947]