AnyEvent-Run
view release on metacpan or search on metacpan
lib/AnyEvent/Run.pm view on Meta::CPAN
if ( AnyEvent::WIN32 ) {
# The Win32 pseudo fork sets up the std handles in the child
# based on the true win32 handles For the exec these get
# remembered, so manipulation of STDIN/OUT/ERR is not enough.
# Only necessary for the exec, as Perl CODE subroutine goes
# through 0/1/2 which are correct. But of course that coderef
# might invoke exec, so better do it regardless.
# HACK: Using Win32::Console as nothing else exposes SetStdHandle
Win32::Console::_SetStdHandle(
STD_INPUT_HANDLE(),
FdGetOsFHandle(fileno($parent))
);
Win32::Console::_SetStdHandle(
STD_OUTPUT_HANDLE(),
FdGetOsFHandle(fileno($parent))
);
Win32::Console::_SetStdHandle(
STD_ERROR_HANDLE(),
FdGetOsFHandle(fileno($parent))
);
}
if ( ref $cmd eq 'CODE' ) {
unless ( AnyEvent::WIN32 ) {
( run in 0.335 second using v1.01-cache-2.11-cpan-4e96b696675 )