summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorNoah Misch <noah@leadboat.com>2019-04-13 11:09:27 -0700
committerNoah Misch <noah@leadboat.com>2019-04-13 11:09:30 -0700
commit55926b0a091793952f7a2bd130e0032d8309a287 (patch)
tree6efff337b68d105a93b9b152aeba1199fcd51e8d
parent808e1e75fb376ff7b39d0c3712fa85ff6e0f0720 (diff)
When Perl "kill(9, ...)" fails, try "pg_ctl kill".
Per buildfarm member jacana, the former fails under msys Perl 5.8.8. Back-patch to 9.6, like the code in question. Discussion: https://postgr.es/m/GrdLgAdUK9FdyZg8VIcTDKVOkys122ZINEb3CjjoySfGj2KyPiMKTh1zqtRp0TAD7FJ27G-OBB3eplxIB5GhcQH5o8zzGZfp0MuJaXJxVxk=@yesql.se
-rw-r--r--src/test/perl/PostgresNode.pm4
1 files changed, 3 insertions, 1 deletions
diff --git a/src/test/perl/PostgresNode.pm b/src/test/perl/PostgresNode.pm
index fd2a67c8c9e..f8e38ab4895 100644
--- a/src/test/perl/PostgresNode.pm
+++ b/src/test/perl/PostgresNode.pm
@@ -725,7 +725,9 @@ sub kill9
my $name = $self->name;
return unless defined $self->{_pid};
print "### Killing node \"$name\" using signal 9\n";
- kill(9, $self->{_pid}) or BAIL_OUT("kill(9, $self->{_pid}) failed");
+ # kill(9, ...) fails under msys Perl 5.8.8, so fall back on pg_ctl.
+ kill(9, $self->{_pid})
+ or TestLib::system_or_bail('pg_ctl', 'kill', 'KILL', $self->{_pid});
$self->{_pid} = undef;
return;
}