Beefy Boxes and Bandwidth Generously Provided by pair Networks
Do you know where your variables are?
 
PerlMonks  

Re: Re: Win32 fork() "problem"

by maa (Pilgrim)
on Mar 26, 2004 at 12:13 UTC ( [id://339991]=note: print w/replies, xml ) Need Help??


in reply to Re: Win32 fork() "problem"
in thread Win32 fork() "problem"

Hi, dawn

I've looked at those modules already and will probably end up utilising Win32::Job on an XP box at some point. This has the benefit of easily being able to set a timeout for a command using $job->run($cmd,$timeout) which is a huge improvement for Win32 platforms.

I was really hoping I had made a glaring logic error (rather than fork() just playing up) in my use of fork...

If I can't get a simple case like this to work (does this work on another platform?) I'll have to resort to a more brute force method of divvying up work. :-(

Replies are listed 'Best First'.
Re: Re: Re: Win32 fork() "problem"
by tilly (Archbishop) on Mar 27, 2004 at 08:49 UTC
    FYI, your code works fine on Linux. Here is the output:
    Parent 962 got PID 963 from fork(962 Computer1) 963 Computer1 +Parent 962 got PID 964 from fork(962 Computer2) 964 Computer2 + 965 Computer3 Parent 962 got PID 965 from fork(962 Computer3) +Parent 962 got PID 966 from fork(962 ) 966 +wait() ed until -1 was returned.
    Another module that you might look into is IPC::Run. I know that it has at least some Win32 functionality.

Log In?
Username:
Password:

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

How do I use this?Last hourOther CB clients
Other Users?
Others surveying the Monastery: (4)
As of 2024-03-29 08:07 GMT
Sections?
Information?
Find Nodes?
Leftovers?
    Voting Booth?

    No recent polls found