View Single Post
Posts: 3 | Thanked: 0 times | Joined on Dec 2009
#15
Originally Posted by j.s View Post
kill should always be tried before kill -9. kill gives the application the chance to clean up after itself before exiting.

At the application level, kill -9 is like pulling the battery or power cord on a computer instead of shutting it down.

After a kill command, repeat it or otherwise check that the process really is dead. If not, then kill -9 is required.
Yes - that's a good point and sound advice - leaving out the -9 (i.e. just kill pid) just sends "please stop any running threads, release allocated memory and exit gracefully" type request to the running process, which should in theory be the end of the matter. Sometimes of course it isn't

Personally I only use -9 to forcefully stop any running tasks that have stalled or refusing to respond to the "normal" /kill command for any reason, which sadly is all too frequently on some of the systems I look after.

So anyone new to linux and the terminal/command line please try /kill pid first, then check top again to see if the offending process is gone, if not then add the -9 switch as Bruce and j.s suggests.

Note also that it is much safer to explicitly say which process you wish to remove by using the pid, rather than the process name, e.g. browserd.

@hopbeat: thx