Beefy Boxes and Bandwidth Generously Provided by pair Networks
go ahead... be a heretic
 
PerlMonks  

Kill running programs

by doob (Pilgrim)
on Nov 23, 2005 at 21:41 UTC ( [id://511258]=perlquestion: print w/replies, xml ) Need Help??

doob has asked for the wisdom of the Perl Monks concerning the following question:

How can I kill applications currently running in Windows by using Perl? I have searched the vast resources available and I came out empty...or I don't know where to look. Can you give me some pointers?

doob

Replies are listed 'Best First'.
Re: Kill running programs
by atcroft (Abbot) on Nov 23, 2005 at 21:50 UTC

    My first suggestion would be one of the Win32::* modules, such as Win32::Process, which appears to be designed for manipulating processes, and includes a method called kill().

    Hope that helps.

      It's better to use Win32::Job as it allows Job control and file handle passing. Perl 5.8 only tho ...

Re: Kill running programs
by johnnywang (Priest) on Nov 23, 2005 at 23:09 UTC
Re: Kill running programs
by GrandFather (Saint) on Nov 23, 2005 at 22:04 UTC

    See also Win32::Process::Info from which you can use GetProcInfo () to find the process info you will need to find the PID of the process you wish to kill.


    DWIM is Perl's answer to Gödel

Log In?
Username:
Password:

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

How do I use this?Last hourOther CB clients
Other Users?
Others browsing the Monastery: (4)
As of 2024-04-23 22:19 GMT
Sections?
Information?
Find Nodes?
Leftovers?
    Voting Booth?

    No recent polls found