1/* 2 * Copyright (c) 1982, 1986, 1989, 1993 3 * The Regents of the University of California. All rights reserved. 4 * 5 * Redistribution and use in source and binary forms, with or without 6 * modification, are permitted provided that the following conditions 7 * are met: 8 * 1. Redistributions of source code must retain the above copyright --- 17 unchanged lines hidden (view full) --- 26 * DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS 27 * OR SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION) 28 * HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT 29 * LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY 30 * OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF 31 * SUCH DAMAGE. 32 * 33 * @(#)tty_pty.c 8.2 (Berkeley) 9/23/93 |
34 * $Id: tty_pty.c,v 1.16 1995/07/31 21:01:25 bde Exp $ |
35 */ 36 37/* 38 * Pseudo-teletype Driver 39 * (Actually two drivers, requiring two entries in 'cdevsw') 40 */ 41#include "pty.h" /* XXX */ 42 --- 264 unchanged lines hidden (view full) --- 307 /* 308 * XXX MDMBUF makes no sense for ptys but would inhibit the above 309 * l_modem(). CLOCAL makes sense but isn't supported. Special 310 * l_modem()s that ignore carrier drop make no sense for ptys but 311 * may be in use because other parts of the line discipline make 312 * sense for ptys. Recover by doing everything that a normal 313 * ttymodem() would have done except for sending a SIGHUP. 314 */ |
315 if (tp->t_state & TS_ISOPEN) { 316 tp->t_state &= ~(TS_CARR_ON | TS_CONNECTED); 317 tp->t_state |= TS_ZOMBIE; 318 ttyflush(tp, FREAD | FWRITE); 319 } |
320 321 tp->t_oproc = 0; /* mark closed */ 322 tp->t_session = 0; 323 return (0); 324} 325 326int 327ptcread(dev, uio, flag) --- 394 unchanged lines hidden --- |