I want to write a Perl code that ends the process of another program of mine, running on Linux.
For example, I execute xxy.py and a process is opened for it. I would like to use Perl to close the process of xxy.py. What do I need to do?
Sign Up to our social questions and Answers Engine to ask questions, answer people’s questions, and connect with other people.
Login to our social questions & Answers Engine to ask questions answer people’s questions & connect with other people.
Lost your password? Please enter your email address. You will receive a link and will create a new password via email.
Please briefly explain why you feel this question should be reported.
Please briefly explain why you feel this answer should be reported.
Please briefly explain why you feel this user should be reported.
Perl extensions are typically .pl or .pm right? .py is for python I think.
Anyway, you can kill a specified program in a Unix environment with something like:
or
if the variable $pid holds the pid of your program.