Sometimes, when I try to force quit an app after it fails to quit using command ⌘+q, it doesn't appear to work. It still shows up in the dock as if it is running, still shows the app in the list when I hit command ⌘+tab to switch between apps, and is still listed in the Force Quit Applications window. However, the app doesn't show up in the list of running processes under the CPU tab in Activity Monitor, so it would appear it isn't actually still running.
killall appname.appin terminal, and that doesn't seem to work either. It just returns
No matching processes belonging to you were found.
If I try to run the app again, I get the error
The application “appname.app” can’t be opened. -600. So it would seem that at least some part of the app is still running.
Often this happens with
Find Any File.app, but sometimes it is some other app I'm running. And occasionally this even happens with Finder when I try to relaunch it. But when Finder won't quit, instead of seeing an error -600, there will simply be no response at all when I click on the Finder icon in the dock to try launching it again.
So far, the only way I have been able to resolve the "unquittable/unlaunchable app" problem is by rebooting my Mac. But sometimes it will hang while trying to restart, so I need to hold the power button down to force it to shut down.
Forcing a shutdown is never a good thing. So I am hoping there may be some other solution to this problem. Perhaps there is some persistent UI process, or some other background process/task that is causing this to happen? Maybe there is something else that I can forcibly quit from Activity Monitor or Terminal that will effectively do a soft restart of OS X?
By the way, I've noticed this tends to happen more often when I have awoken the system from sleep.
In any case, I've searched here for a solution to this (other than doing a hard restart), and haven't been able to find one. So if anyone can help, I would really appreciate it.