While playing Civilization V (most recently) and other games and apps (longer ago), occasionally one will not quit, causing me to have to force-restart my computer.
After awhile of playing, sometimes the game locks up. (I cannot get out to quit the game, nor can I interact with the game at all with keyboard or mouse, though I can move the mouse pointer.) I then ssh in from another Mac to kill the game, and issue a
kill -9 to the game's PID. I then run
ps again to see if it was killed (the game is still showing on my laptop's screen) and I see the below:
PID TT STAT TIME COMMAND 468 ?? ?E 0:00.00 (Civilization V)
ps manpage, I see that the "E" in the status column means that the process is exiting. Five minutes (or so) later, the game is still taking up the screen, frozen, even though the process is gone. I then killed (-9 each time) all the other associated steam processes, and then (in desperation) killed
SystemUIServer and the Dock to try to kick something into gear and, then,
loginwindow to force a logout. None of this worked, so I issued a
sudo shutdown -r now. Fifteen minutes later, it hasn't rebooted, the Civ V is still frozen on my screen, and I can't ssh into the affected system (presumably because the shutdown has stopped sshd).
I'd really rather not have to hard-reboot my computer too many times; does anybody have any ideas how to actually kill Civ?
For the record, I'm running OS X Lion (most recent point version) on an i7 MacBook Air.
EDIT: I've read this other semi-related question, but killing the parent process didn't work either.