Beefy Boxes and Bandwidth Generously Provided by pair Networks
good chemistry is complicated,
and a little bit messy -LW
 
PerlMonks  

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

by BrowserUk (Pope)
on Sep 25, 2013 at 02:23 UTC ( #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
Node Status?
node history
Node Type: note [id://1055595]
help
Chatterbox?
and all is quiet...

How do I use this? | Other CB clients
Other Users?
Others drinking their drinks and smoking their pipes about the Monastery: (2)
As of 2016-12-03 11:26 GMT
Sections?
Information?
Find Nodes?
Leftovers?
    Voting Booth?
    On a regular basis, I'm most likely to spy upon:













    Results (55 votes). Check out past polls.