4

Yes, I've tried all the basic kill, pkill, etc. methods that come up with a Google search.
Sometimes it works, other times it seems something is preventing the process from terminating.
There is no stderr message when the kill command fails, but ps, pgrep, etc. show the process is still running.

Is there a more forceful way to do this? Thanks.

terdon
  • 242,166
voices
  • 1,272
  • 3
    Try kill -9 <PID> – Amit24x7 Jun 27 '17 at 07:30
  • First thing I tried. I thought it would work too, but no such luck in this instance, unfortunately. – voices Jun 27 '17 at 08:14
  • OK, what happened when you tried? Did you get an error message? Nothing? What does the output of ps show for this process? Please [edit] your question and add this information. – terdon Jun 27 '17 at 11:30
  • @terdon yep, that info's already included in the question body. The command executed, without error. It appeared to be successful, but I noticed the (non-responsive) process in question was still running. Confirmed by pgrep, and also ps aux. Wouldn't even let me do a clean reboot. It's not the first time I've encountered this behaviour. – voices Jun 27 '17 at 13:27
  • 1
    Yes, but can you please show us the output of ps so we can see what it reports for the process? Also, if you've tried kill -9 and that also fails, add that to your question too. The more detail you give, the more likely it is that we'll be able to answer. – terdon Jun 27 '17 at 13:38
  • @terdon No, I can't. – voices Jun 27 '17 at 15:52

1 Answers1

5

kill -KILL $PID or kill -9 $PID will forcibly terminate $PID, unless you don't have the permissions to do so (i.e., it belongs to a different user and you're not root), but be very careful with it. Inflicting it on a process will prevent it from doing any kind of filesystem (or other) cleanup.

Petr Skocik
  • 28,816