Skip site navigation (1)Skip section navigation (2)
Date:      Wed, 2 Aug 1995 11:59:49 +1000
From:      Bruce Evans <bde@zeta.org.au>
To:        hackers@freebsd.org, james@miller.cs.uwm.edu
Cc:        current@freebsd.org
Subject:   Re: pseudo-ttys/2.2-current
Message-ID:  <199508020159.LAA12778@godzilla.zeta.org.au>

next in thread | raw e-mail | index | archive | help
[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 */



Want to link to this message? Use this URL: <https://mail-archive.FreeBSD.org/cgi/mid.cgi?199508020159.LAA12778>