No STDERR capture from XS/C under Windows [rt.cpan.org #71701] #7

Open
dagolden opened this Issue Mar 27, 2013 · 3 comments

Comments

Projects
None yet
3 participants
@ghost
Collaborator

ghost commented Mar 27, 2013

https://rt.cpan.org/Ticket/Display.html?id=71701

The attached simple case doesn't capture STDERR in Windows. Seems ok on all other platforms. 
It's not clear to me if this is a Windows thing you can't do anything about? This is a minimal 
example of a general issue of not capturing STDERR from XS/external libs in windows.

This may be related, so not opening a new ticket, but I am also seeing stderr (not stdout) not being captured from a system statement on Windows only:

use strict;
use warnings;
use 5.010;
use Capture::Tiny qw( capture );

my (undef, $stderr) = capture { system $^X, -e => 'print STDERR "some error"' };
say $stderr;  # prints nothing on MSWin32

this does work:

my (undef, $stderr) = capture { print STDERR "some error" };
Contributor

xdg commented Feb 18, 2016

Could you please post/gist your perl -V output?

https://gist.github.com/plicease/38f40e0bb5392bad42fe

this is a fairly standard Strawberry 5.22.1 install.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment