diff options
author | brian <brian@FreeBSD.org> | 1999-01-10 01:26:30 +0000 |
---|---|---|
committer | brian <brian@FreeBSD.org> | 1999-01-10 01:26:30 +0000 |
commit | 541b200a907df9730d6c52f272bc2eb5385c41fe (patch) | |
tree | 05376906d358406080e4668bf48135700a58b1e8 /usr.sbin/ppp/physical.h | |
parent | 3905f929a7f97b0ef4744b343438c8aa71eadaf2 (diff) | |
download | FreeBSD-src-541b200a907df9730d6c52f272bc2eb5385c41fe.zip FreeBSD-src-541b200a907df9730d6c52f272bc2eb5385c41fe.tar.gz |
Only call isatty() when we open our descriptor, and remember
the answer.
If we later get a descriptor exception from select(), we know
that it's a tty (isatty() returns 0 after the exception on a
tty) and remember to call modem_LogicalClose().
The upshot of it all is that descriptor exceptions dont leave
the tty locked any more.
Diffstat (limited to 'usr.sbin/ppp/physical.h')
-rw-r--r-- | usr.sbin/ppp/physical.h | 9 |
1 files changed, 2 insertions, 7 deletions
diff --git a/usr.sbin/ppp/physical.h b/usr.sbin/ppp/physical.h index 2803248..bfd1c74 100644 --- a/usr.sbin/ppp/physical.h +++ b/usr.sbin/ppp/physical.h @@ -16,7 +16,7 @@ * IMPLIED WARRANTIES, INCLUDING, WITHOUT LIMITATION, THE IMPLIED * WARRANTIES OF MERCHANTIBILITY AND FITNESS FOR A PARTICULAR PURPOSE. * - * $Id: physical.h,v 1.3 1998/05/29 18:33:10 brian Exp $ + * $Id: physical.h,v 1.4 1998/08/25 17:48:43 brian Exp $ * */ @@ -30,11 +30,7 @@ struct physical { struct hdlc hdlc; /* Our hdlc state */ int fd; /* File descriptor for this device */ int mbits; /* Current DCD status */ - unsigned dev_is_modem : 1; /* Is the device an actual modem? - Faked for sync devices, though... - (Possibly this should be - dev_is_not_tcp?) XXX-ML */ - + unsigned isatty : 1; struct mbuf *out; /* mbuf that suffered a short write */ int connect_count; struct datalink *dl; /* my owner */ @@ -72,7 +68,6 @@ struct physical { ((d)->type == PHYSICAL_DESCRIPTOR ? field2phys(d, desc) : NULL) extern int physical_GetFD(struct physical *); -extern int physical_IsATTY(struct physical *); extern int physical_IsSync(struct physical *); extern const char *physical_GetDevice(struct physical *); extern void physical_SetDeviceList(struct physical *, int, const char *const *); |