TTY_ON
tty.ty_status &= ~TTY_ON;
tty.ty_status |= TTY_ON;
if ((typ->ty_status & TTY_ON) == 0 ||
(errno == ENOENT && (st & TTY_ON) == 0)))