File tree Expand file tree Collapse file tree 1 file changed +4
-8
lines changed Expand file tree Collapse file tree 1 file changed +4
-8
lines changed Original file line number Diff line number Diff line change @@ -758,15 +758,11 @@ sub command_exit_is
758
758
my $h = IPC::Run::start $cmd ;
759
759
$h -> finish();
760
760
761
- # On Windows, the exit status of the process is returned directly as the
762
- # process's exit code, while on Unix, it's returned in the high bits
763
- # of the exit code (see WEXITSTATUS macro in the standard <sys/wait.h>
764
- # header file). IPC::Run's result function always returns exit code >> 8,
765
- # assuming the Unix convention, which will always return 0 on Windows as
766
- # long as the process was not terminated by an exception. To work around
767
- # that, use $h->full_results on Windows instead.
761
+ # Normally, if the child called exit(N), IPC::Run::result() returns N. On
762
+ # Windows, with IPC::Run v20220807.0 and earlier, full_results() is the
763
+ # method that returns N (https://github.com/toddr/IPC-Run/issues/161).
768
764
my $result =
769
- ($Config {osname } eq " MSWin32" )
765
+ ($Config {osname } eq " MSWin32" && $IPC::Run::VERSION <= 20220807.0 )
770
766
? ($h -> full_results)[0]
771
767
: $h -> result(0);
772
768
is($result , $expected , $test_name );
You can’t perform that action at this time.
0 commit comments