On Mac OS X 10.6 I sometimes get processes that show up in "ps" as "E", which the man page says means they're "trying to exit", but they won't. "kill -9" doesn't work, neither does waiting. Is there any way to get rid of them? I usually wouldn't care, but they sometimes block an entry in the Dock.
Do you get an error when trying to
kill? What if you specify the PID, like
Also, you can try a killall, like this:
killall program but keep in mind it will kill anything that matches, so be a little specific with the program name, dont just put
killall fi or something that may match more than one program, otherwise you may have unexpected results.
I'm having this issue with Mac OS X 10.7.5 as well. In my case, the process trying to exit is mono. It "lost" its parent (should have been bash, or probably Terminal) so there is no way to kill the parent. killall can't even find the process; neither can Activity Monitor. The problem is that this particular process caught hold of an IP port, and, as such, I cannot relaunch the Mono application I was running, since that port is locked until that process exits. One would hope that the release of the lock on the port would time out, but this apparently doesn't happen.
A similar (possibly duplicate) question has been asked here: how to kill process in Mac OS X and not have it restart on its own and also on ServerFault: https://serverfault.com/questions/85799/how-to-kill-an-exiting-process-on-os-x-state-e
The instructions there are also not helpful. Killing launchd and even logging in/out from that user has no effect. Unfortunately, it seems that only a reboot will work in this case.
Also note that this is different from a "zombie" process.
I've filed a bug report with Apple, but I assume they will ignore it (since the issue may be related either to Mono and/or the application I'm using, and having little relation to Mac OS X itself).
sudo kill -9?