Location via proxy:   [ UP ]  
[Report a bug]   [Manage cookies]                
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:17:26 +0000 (07:17 -0500)
per gripe from Andres Freund and Tom Lane

Backpatch to all live branches.

src/test/perl/PostgresNode.pm

index d2f44c4ede07e38cc1041cb94f5e42dfe90dd8a3..cce3f621e713718100b39e3a977f1a3de71b78fe 100644 (file)
@@ -1519,7 +1519,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)
    {