The problem is that when your Dock freezes in OS X it can be difficult to get to programs to restart it or anything pretty much. Luckily, when mine froze today I had a Term open and this is how I restarted it without having to power down my damn computer.
jstump@Joseph-Stumps-Computer jstump$ ps auxw | grep Dock jstump 3231 0.0 0.5 169272 4204 ?? S 9:48AM 0:04.75 /System/Library/CoreServices/Dock.app/Contents/MacOS/Dock -psn_0 jstump 6868 0.0 0.0 18644 92 std R+ 11:45AM 0:00.00 grep Dock jstump@Joseph-Stumps-Computer jstump$ kill -HUP 3231
The second field in
ps‘s output is the
pid for that process (Process ID). Using
kill we can restart the Dock without crashing everything. You’ll see your Dock disappear for a second and reappear in working form a second later.