Skip Menu |
 
rt.cpan.org will be shut down on March 1st, 2021.

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
MIME-Version: 1.0
X-Mailer: MIME-tools 5.504 (Entity 5.504)
X-RT-Interface: Web
Message-ID: <rt-4.0.18-25938-1392699529-1690.0-0-0 [...] rt.cpan.org>
X-RT-Original-Encoding: utf-8
Content-Type: multipart/mixed; boundary="----------=_1392699529-25938-4"
X-RT-Encrypt: 0
X-RT-Sign: 0
Content-Length: 0
Content-Disposition: inline
Content-Type: text/plain; charset="utf-8"
Content-Transfer-Encoding: binary
Content-Length: 1706
Download (untitled) / with headers
text/plain 1.6k
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
MIME-Version: 1.0
Content-Type: application/octet-stream; name="errors"
X-Mailer: MIME-tools 5.504 (Entity 5.504)
Content-Disposition: inline; filename="errors"
Content-Transfer-Encoding: base64
Content-Length: 4027
Download errors
application/octet-stream 3.9k

Message body not shown because it is not plain text.

Subject: perl-v
MIME-Version: 1.0
Content-Type: application/octet-stream; name="perl-v"
X-Mailer: MIME-tools 5.504 (Entity 5.504)
Content-Disposition: inline; filename="perl-v"
Content-Transfer-Encoding: base64
Content-Length: 2810
Download perl-v
application/octet-stream 2.7k

Message body not shown because it is not plain text.

Subject: try.pl
MIME-Version: 1.0
Content-Type: application/x-perl; name="try.pl"
X-Mailer: MIME-tools 5.504 (Entity 5.504)
Content-Disposition: inline; filename="try.pl"
Content-Transfer-Encoding: base64
Content-Length: 634
Download try.pl
text/x-perl 634b
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;
MIME-Version: 1.0
Subject: Errors redirecting STDERR on Windows XP SP3: added missing command lines
In-Reply-To: <rt-4.0.18-25938-1392699529-1690.0-0-0 [...] rt.cpan.org>
X-Mailer: MIME-tools 5.504 (Entity 5.504)
Content-Disposition: inline
X-RT-Interface: Web
References: <rt-4.0.18-25938-1392699529-1690.0-0-0 [...] rt.cpan.org>
Content-Type: text/plain; charset="utf-8"
Message-ID: <rt-4.0.18-24525-1392700580-228.93112-0-0 [...] rt.cpan.org>
Content-Transfer-Encoding: binary
X-RT-Original-Encoding: utf-8
X-RT-Encrypt: 0
X-RT-Sign: 0
Content-Length: 606
Download (untitled) / with headers
text/plain 606b
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.


This service is sponsored and maintained by Best Practical Solutions and runs on Perl.org infrastructure.

Please report any issues with rt.cpan.org to rt-cpan-admin@bestpractical.com.