Beefy Boxes and Bandwidth Generously Provided by pair Networks
Pathologically Eclectic Rubbish Lister
 
PerlMonks  

Re: How do you get the PID of an external process?

by McA (Curate)
on Sep 24, 2013 at 23:21 UTC ( #1055561=note: print w/ replies, xml ) Need Help??


in reply to How do you get the PID of an external process?

Hi,

you say, that the forked childs use $pid = system(1,"start $executable $args") to start "a program". That would mean that the program you call has the name 1. Is that true?

And looking at the documentation of system shows that the returned value is NOT the pid. So, please show us a little example.

Regards
McA


Comment on Re: How do you get the PID of an external process?
Select or Download Code
Re^2: How do you get the PID of an external process?
by salva (Monsignor) on Sep 25, 2013 at 06:41 UTC
    system(1, $cmd) is a special case. IIRC, a hack provided on the port of Perl for Windows to support IPC::Open3 there.

    It just launches the given command on the background.

Log In?
Username:
Password:

What's my password?
Create A New User
Node Status?
node history
Node Type: note [id://1055561]
help
Chatterbox?
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 2014-09-02 19:02 GMT
Sections?
Information?
Find Nodes?
Leftovers?
    Voting Booth?

    My favorite cookbook is:










    Results (29 votes), past polls