… | |
… | |
427 | require Proc::FastSpawn; |
427 | require Proc::FastSpawn; |
428 | |
428 | |
429 | my ($fh, $slave) = AnyEvent::Util::portable_socketpair; |
429 | my ($fh, $slave) = AnyEvent::Util::portable_socketpair; |
430 | Proc::FastSpawn::fd_inherit (fileno $slave); |
430 | Proc::FastSpawn::fd_inherit (fileno $slave); |
431 | |
431 | |
|
|
432 | # new fh's should always be set cloexec (due to $^F), |
|
|
433 | # but hey, not on win32, so we always clear the inherit flag. |
|
|
434 | Proc::FastSpawn::fd_inherit (fileno $fh, 0); |
|
|
435 | |
432 | # quick. also doesn't work in win32. of course. what did you expect |
436 | # quick. also doesn't work in win32. of course. what did you expect |
433 | #local $ENV{PERL5LIB} = join ":", grep !ref, @INC; |
437 | #local $ENV{PERL5LIB} = join ":", grep !ref, @INC; |
434 | my %env = %ENV; |
438 | my %env = %ENV; |
435 | $env{PERL5LIB} = join +(AnyEvent::Fork::Util::WIN32 ? ";" : ":"), grep !ref, @INC; |
439 | $env{PERL5LIB} = join +(AnyEvent::Fork::Util::WIN32 ? ";" : ":"), grep !ref, @INC; |
436 | |
440 | |
… | |
… | |
599 | |
603 | |
600 | =back |
604 | =back |
601 | |
605 | |
602 | =head1 PORTABILITY NOTES |
606 | =head1 PORTABILITY NOTES |
603 | |
607 | |
604 | Win32 is a loser - code has been written for this platform, pain has been |
608 | Native win32 perls are somewhat supported (AnyEvent::Fork::Early is a nop, |
605 | felt, but in the end, this platform is just too broken - maybe a later |
609 | and ::Template is not going to work), and it cost a lot of blood and sweat |
606 | version can do it. |
610 | to make it so, mostly due to the bloody broken perl that nobody seems to |
|
|
611 | care about. The fork emulation is a bad joke - I have yet to see something |
|
|
612 | useful that you cna do with it without running into memory corruption |
|
|
613 | issues or other braindamage. Hrrrr. |
|
|
614 | |
|
|
615 | Cygwin perl is not supported at the moment, as it should implement fd |
|
|
616 | passing, but doesn't, and rolling my own is hard, as cygwin doesn't |
|
|
617 | support enough functionality to do it. |
607 | |
618 | |
608 | =head1 AUTHOR |
619 | =head1 AUTHOR |
609 | |
620 | |
610 | Marc Lehmann <schmorp@schmorp.de> |
621 | Marc Lehmann <schmorp@schmorp.de> |
611 | http://home.schmorp.de/ |
622 | http://home.schmorp.de/ |