0

I`m unable to terminate process by SIGKILL signal.

$ ps aux | grep -i phps
username 17564   0.0  0.0        0      0   ??  ?E   Sun09AM   0:00.00 (phpstorm)
username 27664   0.0  0.0  2442020    788 s000  S+   11:53AM   0:00.00 grep -i phps
$ sudo kill -9 17564
$ ps aux | grep -i phps
username 17564   0.0  0.0        0      0   ??  ?E   Sun09AM   0:00.00 (phpstorm)
username 27883   0.0  0.0  2423392    312 s000  R+   11:55AM   0:00.00 grep -i phps

What does it mean that process in parentheses? How to kill it?

  • @patrix - not exactly a dup - the other question does not show ps output incluing () - so might not be the same. Here the solution is to kill the process that called phpstorm – user151019 Dec 18 '17 at 11:14
  • @Mark right, didn't notice that. Thanks. – nohillside Dec 18 '17 at 11:15
4

I assume that you are trying to kill pis 17564 by kill -9 17564

However it is already dead, shown by ts name being in () in the ps output. (I learnt this as being a zombie process but that seems not to be correct but the solution is the same) It will go away when the process that started it reads its exit code.

The man page for ps says that state E means that the process is trying to exit. The command shown is actually the ucomm (accounting) keyword as the system can't find the actual arguments.

To remove the process the process that calls it has to read its exit code, however there has probably been a failure and it won't do that, so you have to kill the parent process.

ps -ajx will show the status and parent - note that Apple/BSD changed the parameters of ps in Tiger and ps -aux does not work ps aux sees a hack as that is what everyone uses. So you need to read the man page.

  • thank for deep explanation. This helps. ps -ajx shows parent id (PPID) in third row. and ps -ajx -p PID will display exact process status. Tnx again. – Alexander Plaksin Dec 19 '17 at 7:38
  • Update. I was able to reproduce issue once again. First. You -a argument should be avoided if you specify -p. Becouse it will still display all processes. second. ` $ ps -p 542 -jx USER PID PPID PGID SESS JOBC STAT TT TIME COMMAND username 542 1 542 0 1 ?E ?? 0:00.00 (phpstorm) ` It looks like parent is /sbin/launchd. And restarting it is pretty much like restarting the system. – Alexander Plaksin Jan 7 '18 at 4:40

You must log in to answer this question.

Not the answer you're looking for? Browse other questions tagged .