Also connect to the SIGHUP signal.

(Okay, I think that's the last one).