added tty hangups when line discipline is closing