develooper Front page | perl.perl5.porters | Postings from December 2011

[perl #21776] dup2 on XP

Thread Next
James E Keenan via RT
December 1, 2011 17:00
[perl #21776] dup2 on XP
Message ID:
On Mon Mar 31 12:58:25 2003, mgoland wrote:
> Hello guys,
> I think that perl 5.8 on winXP has a problem with file descripter
>    tables. It fails to properly handle parents STDOUT when I dup2 in
>    the child. Here is my script that runs fine on my FreeBSD box. It
>    properly redirects childs STDOUT to a file , while leaving parents
>    STDOUT to the screen. On an XP box, it redirects both parents and
>    childs STDOUT to a file. Any ideas on how to work around it ??

In the hope that someone with Win32 access and experience can respond to
this ticket, I have cleaned up the original poster's program somewhat
and am attaching it as  I'm also attaching a simple
program to serve as the argument for the 'exec' call.  On Darwin, the
program appears to execute as the OP intended.

(And, should someone be curious: No, it didn't get a response when it
was cross-posted on 8-1/2 years ago.)

Thank you very much.
Jim Keenan

Thread Next Perl Programming lists via nntp and http.
Comments to Ask Bjørn Hansen at | Group listing | About