How to kill a process in MacOS?

后端 未结 9 1733
日久生厌
日久生厌 2021-01-30 04:05

I tried kill -9 698 but the process did not die.

$ ps -ef | grep chromium
  502   698   811   0   0:01.24 ??         0:07.28 /Users/lucius/chromium/         


        
相关标签:
9条回答
  • 2021-01-30 04:31

    in the spotlight, search for Activity Monitor. You can force fully remove any application from here.

    0 讨论(0)
  • 2021-01-30 04:36

    If kill -9 isn't working, then neither will killall (or even killall -9 which would be more "intense"). Apparently the chromium process is stuck in a non-interruptible system call (i.e., in the kernel, not in userland) -- didn't think MacOSX had any of those left, but I guess there's always one more:-(. If that process has a controlling terminal you can probably background it and kill it while backgrounded; otherwise (or if the intense killing doesn't work even once the process is bakcgrounded) I'm out of ideas and I'm thinking you might have to reboot:-(.

    0 讨论(0)
  • 2021-01-30 04:39

    I have experienced that if kill -9 PID doesn't work and you own the process, you can use kill -s kill PID which is kind of surprising as the man page says you can kill -signal_number PID.

    0 讨论(0)
提交回复
热议问题