Since 10.2 there's a much simpler way:
% killall DockOf course this works for all processes, not just the dock.
[Editor's note: You can use the "-d" option if you'd like to see a description of the processes that 'killall' killed. Personally, I'll continue to use the harder method, as I still fear killing an unintended process if I do something stupid like think "Dock" but type "Finder!"]

