[watchdog] if we're exiting don't bother checking main.

Fairly big messy diff, but it cleans up some occasional spew at process exit time.