From owner-freebsd-current Tue Aug 1 19:03:50 1995 Return-Path: current-owner Received: (from majordom@localhost) by freefall.cdrom.com (8.6.11/8.6.6) id TAA22018 for current-outgoing; Tue, 1 Aug 1995 19:03:50 -0700 Received: from godzilla.zeta.org.au (godzilla.zeta.org.au [203.2.228.34]) by freefall.cdrom.com (8.6.11/8.6.6) with ESMTP id TAA22000 ; Tue, 1 Aug 1995 19:03:26 -0700 Received: (from bde@localhost) by godzilla.zeta.org.au (8.6.9/8.6.9) id LAA12778; Wed, 2 Aug 1995 11:59:49 +1000 Date: Wed, 2 Aug 1995 11:59:49 +1000 From: Bruce Evans Message-Id: <199508020159.LAA12778@godzilla.zeta.org.au> To: hackers@freebsd.org, james@miller.cs.uwm.edu Subject: Re: pseudo-ttys/2.2-current Cc: current@freebsd.org Sender: current-owner@freebsd.org Precedence: bulk [Please report current bugs in current and not in hackers.] >I have a strange problem with psuedo ttys since I upgraded to -current. >When I run xterm, rlogin, telnet or anything that uses ptys, they seem >to fail (sometimes). They seem to work every other time. It is consistant >with rlogin, telnet, xterm, and anything else that uses ptys. >I have attached an example. Any ideas? Oops. Apparently ptcsclose() often closes already-closed ptys. A bug in the new code made this more of a problem. This was easy to debug using `pstat -t'. Try the following patch or wait for it to be committed. Bruce *** /sys/kern/tty_pty.c~ Tue Aug 1 13:50:26 1995 --- /sys/kern/tty_pty.c Wed Aug 2 11:49:01 1995 *************** *** 313,319 **** * ttymodem() would have done except for sending a SIGHUP. */ ! tp->t_state &= ~(TS_CARR_ON | TS_CONNECTED); ! tp->t_state |= TS_ZOMBIE; ! ttyflush(tp, FREAD | FWRITE); tp->t_oproc = 0; /* mark closed */ --- 313,321 ---- * ttymodem() would have done except for sending a SIGHUP. */ ! if (tp->t_state & TS_ISOPEN) { ! tp->t_state &= ~(TS_CARR_ON | TS_CONNECTED); ! tp->t_state |= TS_ZOMBIE; ! ttyflush(tp, FREAD | FWRITE); ! } tp->t_oproc = 0; /* mark closed */