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

Re: Process id

by tachyon (Chancellor)
on Dec 07, 2004 at 06:04 UTC ( #412835=note: print w/ replies, xml ) Need Help??

in reply to Process id

One way is to do a fork/exec which is all system really is anyway:

my $pid = fork (); die "Fork failed!\n" unless defined $pid; if ( $pid == 0 ) { # convert kid to java process exec( $path_to_java_process ); exit 0; # for clarity, we don't actually get here } # in the parent $pid holds PID of child which is (now) the java proces +s



Comment on Re: Process id
Download Code
Replies are listed 'Best First'.
Re^2: Process id
by tilly (Archbishop) on Dec 07, 2004 at 16:03 UTC
    If you're going to be launching processes yourself, don't forget to reap them as well. If you want to catch errors on exit, you'll probably want to call wait or waitpid to do that.

Log In?

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

How do I use this? | Other CB clients
Other Users?
Others avoiding work at the Monastery: (12)
As of 2015-11-25 15:52 GMT
Find Nodes?
    Voting Booth?

    What would be the most significant thing to happen if a rope (or wire) tied the Earth and the Moon together?

    Results (682 votes), past polls