]> git.ipfire.org Git - thirdparty/postgresql.git/commitdiff
Fix perl warning from commit 9b4eafcaf4
authorAndrew Dunstan <andrew@dunslane.net>
Wed, 23 Nov 2022 12:03:06 +0000 (07:03 -0500)
committerAndrew Dunstan <andrew@dunslane.net>
Wed, 23 Nov 2022 12:14:50 +0000 (07:14 -0500)
per gripe from Andres Freund and Tom Lane

Backpatch to all live branches.

src/test/perl/PostgreSQL/Test/Cluster.pm

index cae3a960f660189c28d57067a4f3ac3d9d0cfab6..69a8ff3d743d2ebe7b3d855d1662464c7fbd1ef3 100644 (file)
@@ -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)
        {