SCCS-vsn: sys/hp300/dev/dcm.c 7.3
SCCS-vsn: sys/hp/dev/dca.c 7.3
SCCS-vsn: sys/vax/uba/dz.c 7.8
SCCS-vsn: sys/vax/uba/dmx.c 7.3
SCCS-vsn: sys/vax/uba/dhu.c 7.11
SCCS-vsn: sys/vax/uba/dh.c 7.13
SCCS-vsn: sys/tahoe/vba/vx.c 7.7
SCCS-vsn: sys/tahoe/vba/mp.c 7.12
*
* %sccs.include.redist.c%
*
*
* %sccs.include.redist.c%
*
- * @(#)dca.c 7.2 (Berkeley) %G%
+ * @(#)dca.c 7.3 (Berkeley) %G%
while (!(flag&O_NONBLOCK) && !(tp->t_cflag&CLOCAL) &&
(tp->t_state & TS_CARR_ON) == 0) {
tp->t_state |= TS_WOPEN;
while (!(flag&O_NONBLOCK) && !(tp->t_cflag&CLOCAL) &&
(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))) {
tp->t_state &= ~TS_WOPEN;
(void) spl0();
return (error);
tp->t_state &= ~TS_WOPEN;
(void) spl0();
return (error);
*
* from: $Hdr: dcm.c 1.17 89/10/01$
*
*
* from: $Hdr: dcm.c 1.17 89/10/01$
*
- * @(#)dcm.c 7.2 (Berkeley) %G%
+ * @(#)dcm.c 7.3 (Berkeley) %G%
while (!(flag&O_NONBLOCK) && !(tp->t_cflag&CLOCAL) &&
(tp->t_state & TS_CARR_ON) == 0) {
tp->t_state |= TS_WOPEN;
while (!(flag&O_NONBLOCK) && !(tp->t_cflag&CLOCAL) &&
(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))) {
tp->t_state &= ~TS_WOPEN;
(void) spl0();
return (error);
tp->t_state &= ~TS_WOPEN;
(void) spl0();
return (error);
* IMPLIED WARRANTIES, INCLUDING, WITHOUT LIMITATION, THE IMPLIED
* WARRANTIES OF MERCHANTIBILITY AND FITNESS FOR A PARTICULAR PURPOSE.
*
* IMPLIED WARRANTIES, INCLUDING, WITHOUT LIMITATION, THE IMPLIED
* WARRANTIES OF MERCHANTIBILITY AND FITNESS FOR A PARTICULAR PURPOSE.
*
- * @(#)mp.c 7.11 (Berkeley) %G%
+ * @(#)mp.c 7.12 (Berkeley) %G%
}
while ((mode&O_NONBLOCK) == 0 && (tp->t_cflag&CLOCAL) == 0 &&
(tp->t_state & TS_CARR_ON) == 0) {
}
while ((mode&O_NONBLOCK) == 0 && (tp->t_cflag&CLOCAL) == 0 &&
(tp->t_state & TS_CARR_ON) == 0) {
- 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)))
goto bad;
/*
* a mpclose() might have disabled port. if so restart
goto bad;
/*
* a mpclose() might have disabled port. if so restart
* IMPLIED WARRANTIES, INCLUDING, WITHOUT LIMITATION, THE IMPLIED
* WARRANTIES OF MERCHANTIBILITY AND FITNESS FOR A PARTICULAR PURPOSE.
*
* IMPLIED WARRANTIES, INCLUDING, WITHOUT LIMITATION, THE IMPLIED
* WARRANTIES OF MERCHANTIBILITY AND FITNESS FOR A PARTICULAR PURPOSE.
*
- * @(#)vx.c 7.6 (Berkeley) %G%
+ * @(#)vx.c 7.7 (Berkeley) %G%
vcmodem(dev, VMOD_ON);
while (!(flag&O_NONBLOCK) && !(tp->t_cflag&CLOCAL) &&
(tp->t_state&TS_CARR_ON) == 0)
vcmodem(dev, VMOD_ON);
while (!(flag&O_NONBLOCK) && !(tp->t_cflag&CLOCAL) &&
(tp->t_state&TS_CARR_ON) == 0)
- 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;
if (error == 0)
error = (*linesw[tp->t_line].l_open)(dev,tp);
break;
if (error == 0)
error = (*linesw[tp->t_line].l_open)(dev,tp);
* All rights reserved. The Berkeley software License Agreement
* specifies the terms and conditions for redistribution.
*
* All rights reserved. The Berkeley software License Agreement
* specifies the terms and conditions for redistribution.
*
- * @(#)dh.c 7.12 (Berkeley) %G%
+ * @(#)dh.c 7.13 (Berkeley) %G%
if (tp->t_state&TS_CARR_ON || flag&O_NONBLOCK ||
tp->t_cflag&CLOCAL)
break;
if (tp->t_state&TS_CARR_ON || flag&O_NONBLOCK ||
tp->t_cflag&CLOCAL)
break;
- 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)))
* All rights reserved. The Berkeley software License Agreement
* specifies the terms and conditions for redistribution.
*
* 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;
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)))
* All rights reserved. The Berkeley software License Agreement
* specifies the terms and conditions for redistribution.
*
* All rights reserved. The Berkeley software License Agreement
* specifies the terms and conditions for redistribution.
*
- * @(#)dmx.c 7.2 (Berkeley) %G%
+ * @(#)dmx.c 7.3 (Berkeley) %G%
tp->t_cflag&CLOCAL)
break;
tp->t_state |= TS_WOPEN;
tp->t_cflag&CLOCAL)
break;
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)))
* All rights reserved. The Berkeley software License Agreement
* specifies the terms and conditions for redistribution.
*
* All rights reserved. The Berkeley software License Agreement
* specifies the terms and conditions for redistribution.
*
- * @(#)dz.c 7.7 (Berkeley) %G%
+ * @(#)dz.c 7.8 (Berkeley) %G%
while ((flag&O_NONBLOCK) == 0 && (tp->t_cflag&CLOCAL) == 0 &&
(tp->t_state & TS_CARR_ON) == 0) {
tp->t_state |= TS_WOPEN;
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)))