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

Backpatch to all live branches.

src/test/perl/PostgresNode.pm

index 6a6894e64090a6e5c4cd7e34b12ccc1771aa0a8d..6506308ff19c9f79fcd0fad105943b6ee4b7b76c 100644 (file)
@@ -1292,7 +1292,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)
        {