I was working with Xcode and it stopped responding so I force quit, reported the error, and tried reopening the app. When reopening the dock hung too so I ended up having to restart the dock with killall -KILL Dock. Unfortunately now OS X thinks Xcode is running but hung. Long pressing the icon in the dock or going to the force quit screen clearly show the app but selecting "Force Quit" does nothing and the app does not appear when I do ps -e.

Screenshot showing Xcode open but no result from <code>ps</code>.

Is there any way I can get OS X to realize the app isn't running so I can open it or safely restart the OS?

1 Answer 1


This bug occurs occasionally for me, and the ‘safest’ workaround I've found which I use is to quit all other open apps, then quit (not force quit) WindowServer. This logs out the current user without taking regard for apps which desire to interrupt this process, or apps which the OS still believe are running.


According to an Apple Support Communities thread, this problem is caused by the kernel:

If "killall -KILL process_name" or "kill -KILL process_pid_number" does not kill the process, then that process is hung in the kernel, as a kill signal cannot be delivered until the process returns from kernel space to user space.

Source: https://discussions.apple.com/message/26762830?tstart=0#26762830

…but I'm not certain how accurate this is. Certain apps seem to exhibit this behaviour more often than others and I am yet to find a link as to what the actual cause of the problem/bug is.

  • 1
    I ran into a problem here where hitting Quit did nothing. I ended up going to the terminal to kill the process and found I was getting "Operation not permitted" errors and had to do sudo kill instead. I ended up killing loginwindow instead which also worked. Mar 26, 2015 at 20:10
  • 1
    Thanks, I was able to restart after sudo killall -KILL WindowServer
    – lucrussell
    Oct 19, 2015 at 0:49

You must log in to answer this question.

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