ttycheckoutq
if (sess && sess->s_ttyvp && ttycheckoutq(sess->s_ttyp, 0)) {
if (ttycheckoutq(tp,0) == 0)
int ttycheckoutq (struct tty *tp, int wait);