Beefy Boxes and Bandwidth Generously Provided by pair Networks
more useful options
 
PerlMonks  

Re: From WinNT to Unix

by jwest (Friar)
on Apr 17, 2001 at 18:14 UTC ( [id://73139]=note: print w/replies, xml ) Need Help??


in reply to From WinNT to Unix

Well, I'm not sure what the side effects of Win32::Process::Create are, but generally speaking, you can get the same effect by using the system() function.

system("md5 $IdocFileName $IdocMd5FileName &") and die "System failed";

Another approach is to use fork() to create a process, and exec() the process you want it to run.
my @pids; my $pid; if ($pid = fork()) { # Parent process push(@pids, $pid); } else { # Child process exec('md5', $IdocFileName, $IdocMd5FileName); exit; # This should never be reached. } ... # Clean up the children later... foreach $pid (@pids) { waitpid($pid); }
system() handles most of this for you, though.

Hope this helps!

--jwest
-><- -><- -><- -><- -><-
All things are Perfect
    To every last Flaw
    And bound in accord
         With Eris's Law
            HBT; The Book of Advice, 1:7

Log In?
Username:
Password:

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

How do I use this?Last hourOther CB clients
Other Users?
Others making s'mores by the fire in the courtyard of the Monastery: (2)
As of 2024-04-26 01:42 GMT
Sections?
Information?
Find Nodes?
Leftovers?
    Voting Booth?

    No recent polls found