* All rights reserved. The Berkeley software License Agreement
* specifies the terms and conditions for redistribution.
*
- * @(#)dhu.c 7.10 (Berkeley) %G%
+ * @(#)dhu.c 7.11 (Berkeley) %G%
*/
/*
while ((flag&O_NONBLOCK) == 0 && (tp->t_cflag&CLOCAL) == 0 &&
(tp->t_state & TS_CARR_ON) == 0) {
tp->t_state |= TS_WOPEN;
- if (error = tsleep((caddr_t)&tp->t_rawq, TTIPRI | PCATCH,
- ttopen, 0))
+ if ((error = tsleep((caddr_t)&tp->t_rawq, TTIPRI | PCATCH,
+ ttopen, 0)) ||
+ (error = ttclosed(tp)))
break;
}
(void) splx(s);