Beefy Boxes and Bandwidth Generously Provided by pair Networks
go ahead... be a heretic
 
PerlMonks  

Re: Simultaneous system() calls

by halley (Prior)
on Feb 17, 2004 at 21:07 UTC ( [id://329739]=note: print w/replies, xml ) Need Help??


in reply to Simultaneous system() calls

Windows shells have the start command to launch stuff in a variety of ways. It's a bit of extra overhead because it now requires an extra layer of command interpreter.

For example, start /b turtle.exe will try to launch turtle.exe, and give you a success/fail result code. It will not wait for turtle.exe to finish, so any result code provided by turtle.exe is completely lost.

my $command = "turtle.exe"; if ($^O =~ /win/i) { $command = "start /b $command" } else { $command = "$command &" } my $ret = system($command);
However, there's no shell-accessible way of using Win32's WaitForMultipleObjects() API, which is what you'd need to launch A, B and C, and wait for all three to complete.

--
[ e d @ h a l l e y . c c ]

Log In?
Username:
Password:

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

How do I use this?Last hourOther CB clients
Other Users?
Others browsing the Monastery: (7)
As of 2024-04-19 10:55 GMT
Sections?
Information?
Find Nodes?
Leftovers?
    Voting Booth?

    No recent polls found