Skip Menu |

This queue is for tickets about the IPC-Exe CPAN distribution.

Report information
The Basics
Id: 93112
Status: new
Priority: 0/
Queue: IPC-Exe

People
Owner: Nobody in particular
Requestors: djerius [...] cpan.org
Cc:
AdminCc:

Bug Information
Severity: (no value)
Broken in: 2.002001
Fixed in: (no value)



Subject: Errors redirecting STDERR on Windows XP SP3
Hi, Despite the successes on Win32 on CPAN Testers, IPC::Exe is failing tests on a Windows XP SP3 system running strawberry Perl 5.18.2. In particular, it seems to be failing tests which read or redirect STDERR. I've attached a log of the errors and of the results of running 'perl -v'. I've reduced the code to that in the attached file. If run as perl -s try.pl -output=stdout the child process will write to stdout with no capturing. This results in: ------------------------------------------------- line1 line2 line3 ------------------------------------------------- which is expected. Capturing stdout via perl -s try.pl -output=stdout -capture_stdout results in ------------------------------------------------- $VAR1 = { 'stdout' => [ 'line1 ', 'line2 ', 'line3 ' ] }; ------------------------------------------------- which is also expected. Output to stderr works: perl -s try.pl -output=stderr ------------------------------------------------- line4 line5 line6 ------------------------------------------------- but capturing to stderr doesn't: ------------------------------------------------- $VAR1 = { 'stderr' => [] }; ------------------------------------------------- Weirder, outputing to stdout and capturing stderr does not work: ------------------------------------------------- $VAR1 = { 'stderr' => [] }; ------------------------------------------------- All of the above work as expected on a Linux box. I know little to nothing about Windows, but I'm willing to poke at it if given directions. Thanks, Diab
Subject: errors
Download errors
application/octet-stream 3.9k

Message body not shown because it is not plain text.

Subject: perl-v
Download perl-v
application/octet-stream 2.7k

Message body not shown because it is not plain text.

Subject: try.pl
use IPC::Exe 'exe'; use Data::Dumper; # create generators my %gen = ( stdout => [ $^X, '-le', 'print STDOUT $_ for qw(line1 line2 line3); exit 44' ], stderr => [ $^X, '-le', 'print STDERR $_ for qw(line4 line5 line6); exit 77' ], ); my @fh; my ( $pid, @fh ) = &{ exe +{ stdout => $capture_stdout//0, stderr => $capture_stderr//0 }, @{ $gen{$output // 'stdout' } } }; my %res = ( $capture_stdout ? do { my $fh = shift @fh; ( stdout => [ <$fh> ] ) } : (), $capture_stderr ? do { my $fh = shift @fh; ( stderr => [ <$fh> ] ) } : (), ); print Dumper \%res if %res;
Subject: Errors redirecting STDERR on Windows XP SP3: added missing command lines
Sorry, I forgot a couple of command lines in the first message: Output to stderr and capturing of stderr doesn't work: perl -s try.pl -output=stderr -capture_stderr ------------------------------------------------- $VAR1 = { 'stderr' => [] }; ------------------------------------------------- Output to stdout and capturing of stderr does not work: perl -s try.pl -output=stdout -capture_stderr ------------------------------------------------- $VAR1 = { 'stderr' => [] }; ------------------------------------------------- The output to stdout has disappeared.