Beefy Boxes and Bandwidth Generously Provided by pair Networks
Perl Monk, Perl Meditation
 
PerlMonks  

Re: Killing processes

by jimw54321 (Acolyte)
on Mar 20, 2015 at 18:19 UTC ( [id://1120785]=note: print w/replies, xml ) Need Help??


in reply to Killing processes

Greeting Everyone,

Two comments

My understanding is that the kill command only reports whether or not it successfully sent a signal which may or may not have actually killed the process. The only safe thing to do is to check whatever mechanism you have for getting the PIDs in the first.

Tangentially, IMHO, backticks are best avoided in Perl code. The syntax `some command` looks nicer as qx|some command|.

Replies are listed 'Best First'.
Re^2: Killing processes
by deyaneria (Acolyte) on Mar 20, 2015 at 18:30 UTC
    I check to see if the process has been terminated. I start something like an infinite loop under another users name and switch accounts and kill it(run the script) from su access. Then flip back and make sure. It was definitely killing the processes. I also have checked the pids of the user under the unix terminal after running the script. I thank you for your insights:)

Log In?
Username:
Password:

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

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

    No recent polls found