Beefy Boxes and Bandwidth Generously Provided by pair Networks
Your skill will accomplish
what the force of many cannot
 
PerlMonks  

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

by BrowserUk (Patriarch)
on Sep 25, 2013 at 02:23 UTC ( [id://1055595]=note: print w/replies, xml ) Need Help??


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

Each of these children uses $pid = system(1,"start $executable $args") to start a program.

Don't use start in your command. Start requires a shell to run your program and it is the pid of that shell that is returned to you.

Just use: my $pid = system 1, "$executable $args";


With the rise and rise of 'Social' network sites: 'Computers are making people easier to use everyday'
Examine what is said, not who speaks -- Silence betokens consent -- Love the truth but pardon error.
"Science is about questioning the status quo. Questioning authority".
In the absence of evidence, opinion is indistinguishable from prejudice.

Replies are listed 'Best First'.
Re^2: How do you get the PID of an external process?
by McA (Priest) on Sep 25, 2013 at 05:50 UTC

    Hi BrowserUK,

    I'm really curious if this kind of call is a speciality on Windows or something special in Perl on Windows. I don't know that API. Can you give me a pointer to the relevant documentation?

    Thank you in advance

    McA

      Beyond, How does system(1,"foo") work on Windows? & similar, I've never seen it documented. Damn glad it exists though :)


      With the rise and rise of 'Social' network sites: 'Computers are making people easier to use everyday'
      Examine what is said, not who speaks -- Silence betokens consent -- Love the truth but pardon error.
      "Science is about questioning the status quo. Questioning authority".
      In the absence of evidence, opinion is indistinguishable from prejudice.

        BrowserUK, soonix,

        thank you for that link (*). A really interesting piece of information.

        Best regards
        McA

        (*) ++

Log In?
Username:
Password:

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

How do I use this?Last hourOther CB clients
Other Users?
Others lurking in the Monastery: (5)
As of 2024-04-19 03:42 GMT
Sections?
Information?
Find Nodes?
Leftovers?
    Voting Booth?

    No recent polls found