Changing the tty-disconnection code to use setsid().