postgres.git / summary / log / commit / refs

commit    61c0962d90d5386a24a30970ff4635cce68051bb
Author:   Noah Misch <noah@leadboat.com>
Date:     Sat Apr 13 18:09:27 2019 +0000
First released in: 12.0, 9.6.13, 10.8, 11.3

    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


src/test/perl/PostgresNode.pm | 4 +++- 1 file changed, 3 insertions(+), 1 deletion(-) diff --git a/src/test/perl/PostgresNode.pm b/src/test/perl/PostgresNode.pm index 52708205850..fff8c992a37 100644 --- a/src/test/perl/PostgresNode.pm +++ b/src/test/perl/PostgresNode.pm @@ -734,7 +734,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; } [parent: d4c50b4b1f86]