Skip to content

Commit

Permalink
Delay kill_kill.t SIGTERM to fix test for NetBSD 10.
Browse files Browse the repository at this point in the history
Fixes #175
  • Loading branch information
nmisch committed Nov 10, 2024
1 parent 2128df3 commit e7bbc65
Show file tree
Hide file tree
Showing 2 changed files with 11 additions and 3 deletions.
2 changes: 1 addition & 1 deletion .github/workflows/bsd.yml
Original file line number Diff line number Diff line change
Expand Up @@ -29,7 +29,7 @@ jobs:
pkginstall: echo no packages required

- name: netbsd
version: '9.3'
version: '10.0'
pkginstall: pkgin -y install perl || true
steps:
- uses: actions/checkout@v4
Expand Down
12 changes: 10 additions & 2 deletions t/kill_kill.t
Original file line number Diff line number Diff line change
Expand Up @@ -34,14 +34,22 @@ else {

# Test 1
SCOPE: {
my $out;
my $h = IPC::Run::start(
[
$^X,
'-e',
'sleep while 1',
]
'$|=1;print "running\n";sleep while 1',
],
\undef,
\$out
);

# On most platforms, we don't need to wait to read the "running" message.
# On NetBSD 10.0, not waiting led to us often issuing kill(kid, SIGTERM)
# before the end of the child's exec(). Per https://gnats.netbsd.org/58268,
# NetBSD then discarded the signal.
pump $h until $out =~ /running/;
my $needed = $h->kill_kill;
ok( !$needed, 'Did not need kill_kill' );
}
Expand Down

0 comments on commit e7bbc65

Please sign in to comment.