Bug fix: don't do the final kill $watchdogpid unless it's been set.