Beefy Boxes and Bandwidth Generously Provided by pair Networks
We don't bite newbies here... much
 
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.


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 McA (Curate) 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 the web crawler heard nothing...

How do I use this? | Other CB clients
Other Users?
Others rifling through the Monastery: (5)
As of 2014-09-23 02:40 GMT
Sections?
Information?
Find Nodes?
Leftovers?
    Voting Booth?

    How do you remember the number of days in each month?











    Results (210 votes), past polls