No STDERR capture from XS/C under Windows [ #71701] #7

dagolden opened this Issue Mar 27, 2013 · 3 comments


None yet
3 participants

ghost commented Mar 27, 2013

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" };

xdg commented Feb 18, 2016

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

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