more common bsd tty code