Creative Commons

2009-09-07 18:50:43

Frozen Mac? Maybe Not Completely...

So it just happened to me. I copied some photos/movies from a Memory Stick onto my computer and decided to look at them using Preview. I made it through the photos and got to the movies at the bottom of the list. Upon trying to move from the first movie to the second, I got the spinning wheel of death. Preview was stuck and there was no way to close it. It froze Finder completely.
What do I do? I'm not going to reboot my computer. That's stupid. I can open other programs and do pretty much anything else. I just can't use Finder, which, for those non-Mac users, is the "My Computer" functionality on a Mac. So I guess you could say that I couldn't browse the filesystem. Lucky for me, I know *nix.
If you know a little bit about *nix, you're aware that everything that runs on your system is just a plain old process, and processes have a process ID. I decided to find the Finder process and give it a kick in the butt, or a HUP signal. Hopefully that would work. So I started by seeing if I could find Finder in the process list. In a terminal:
<slonkak@apple0-2> [~] ps ax | grep -i finder 111 ?? S 0:33.51 /System/Library/CoreServices/ 192 s000 R+ 0:00.00 grep -i finder
Great! Finder has a process ID of 111. Now all I have to do is restart it in such a way that the whole system doesn't die (like it does when you kill and restart Windows Explorer). This is where the HUP signal comes into play. I should note here that not every program correctly responds to the HUP signal. Some programs completely die and some ignore it. Let's hope Finder does the right thing and restarts.
<slonkak@apple0-2> [~] sudo kill -1 111
Success!!! The preview window closed, the spinning wheel of death stopped, and my Finder window is still on the screen and fully functional. I must note, however, that even without the HUP signal Finder restarts properly. I just prefer giving it the HUP to be safe.
So there you go! You now know how to fix a frozen Finder as long as you still have access to a terminal.

NOTE: I have the terminal launcher in my dock. If you don't, you're pretty much out of luck since you can't use Finder to go to Applications > Utilities and launch it. So, take the hint and drag the terminal app to your dock right now!


Post a comment!