diff options
Diffstat (limited to 'ext/IPC-Open3/t/IPC-Open3.t')
-rw-r--r-- | ext/IPC-Open3/t/IPC-Open3.t | 7 |
1 files changed, 6 insertions, 1 deletions
diff --git a/ext/IPC-Open3/t/IPC-Open3.t b/ext/IPC-Open3/t/IPC-Open3.t index 7b85b825e2..6ab519d002 100644 --- a/ext/IPC-Open3/t/IPC-Open3.t +++ b/ext/IPC-Open3/t/IPC-Open3.t @@ -14,10 +14,11 @@ BEGIN { } use strict; -use Test::More tests => 37; +use Test::More tests => 38; use IO::Handle; use IPC::Open3; +use POSIX ":sys_wait_h"; my $perl = $^X; @@ -154,6 +155,10 @@ $TB->current_test($test); isnt($@, '', 'open3 of a non existent program fails with an exception in the parent') or do {waitpid $pid, 0}; + SKIP: { + skip 'open3 returned, our responsibility to reap', 1 unless $@; + is(waitpid(-1, WNOHANG), -1, 'failed exec child is reaped'); + } } $pid = eval { open3 'WRITE', '', 'ERROR', '/non/existent/program'; }; |