mine did that last night, it was a blue screen with the spinning dial at the the bottom. only did this once and now its fine though. snow leopard 10.6.2
Just Safari shouldnt do that, I know other programs (iPhoto for one) does some kind of indexing before quitting during a shut down, and I am sure others do as well.