Beefy Boxes and Bandwidth Generously Provided by pair Networks
Think about Loose Coupling

Re^2: Windows filehandles and fork

by bart (Canon)
on Apr 09, 2004 at 08:07 UTC ( #343864=note: print w/replies, xml ) Need Help??

in reply to Re: Windows filehandles and fork
in thread Windows filehandles and fork

i guess that under windows fork is implemented using threads so the child does not have his own STDOUT.
My guess is that that is indeed what is happening.
Why are you dont you open a new filhandle in each child process
Because he wants to use it together with system(), and that won't work as intended, with any other filehandle.

Update: Gee, Koosemose appears to be right, this does seem to work right (at least on Win98):

open CHILDOUT, ">test.txt"; select CHILDOUT; system('perl -le "print q(Hello!)"');

I think that would indeed solve it.

Log In?

What's my password?
Create A New User
Domain Nodelet?
Node Status?
node history
Node Type: note [id://343864]
and the web crawler heard nothing...

How do I use this? | Other CB clients
Other Users?
Others about the Monastery: (4)
As of 2023-05-29 17:34 GMT
Find Nodes?
    Voting Booth?

    No recent polls found