Skip to content

Commit e7bbc65

Browse files
committed
Delay kill_kill.t SIGTERM to fix test for NetBSD 10.
Fixes #175
1 parent 2128df3 commit e7bbc65

File tree

2 files changed

+11
-3
lines changed

2 files changed

+11
-3
lines changed

.github/workflows/bsd.yml

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -29,7 +29,7 @@ jobs:
2929
pkginstall: echo no packages required
3030

3131
- name: netbsd
32-
version: '9.3'
32+
version: '10.0'
3333
pkginstall: pkgin -y install perl || true
3434
steps:
3535
- uses: actions/checkout@v4

t/kill_kill.t

Lines changed: 10 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -34,14 +34,22 @@ else {
3434

3535
# Test 1
3636
SCOPE: {
37+
my $out;
3738
my $h = IPC::Run::start(
3839
[
3940
$^X,
4041
'-e',
41-
'sleep while 1',
42-
]
42+
'$|=1;print "running\n";sleep while 1',
43+
],
44+
\undef,
45+
\$out
4346
);
4447

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

0 commit comments

Comments
 (0)