Skip site navigation (1)Skip section navigation (2)
Date:      Fri, 14 May 1999 14:11:52 -0500
From:      "Matthew D. Fuller" <fullermd@futuresouth.com>
To:        Luoqi Chen <luoqi@watermarkgroup.com>
Cc:        sheldonh@uunet.co.za, current@FreeBSD.ORG, gmarco@scotty.masternet.it
Subject:   Re: Panic with screen w/info (was Re: Today's kernel crashes on starting X)
Message-ID:  <19990514141151.B21020@futuresouth.com>
In-Reply-To: <199905141736.NAA06376@lor.watermarkgroup.com>; from Luoqi Chen on Fri, May 14, 1999 at 01:36:41PM -0400
References:  <199905141736.NAA06376@lor.watermarkgroup.com>

next in thread | previous in thread | raw e-mail | index | archive | help

On Fri, May 14, 1999 at 01:36:41PM -0400, a little birdie told me
that Luoqi Chen remarked
> Here's the better fix, please let me know if it works,

I won't be in a position to crash this box again until tomorrow, but I'll
give it a whirl then.

Thanks.

> Index: tty_pty.c
> ===================================================================
> RCS file: /home/ncvs/src/sys/kern/tty_pty.c,v
> retrieving revision 1.57
> diff -u -r1.57 tty_pty.c
> --- tty_pty.c	1999/05/08 06:39:43	1.57
> +++ tty_pty.c	1999/05/14 17:32:33
> @@ -674,8 +674,7 @@
>  			tp->t_lflag &= ~EXTPROC;
>  		}
>  		return(0);
> -	} else
> -	if (devsw(dev)->d_open == ptcopen)
> +	} else if (devsw(dev)->d_open == ptcopen) {
>  		switch (cmd) {
>  
>  		case TIOCGPGRP:
> @@ -711,7 +710,16 @@
>  				pti->pt_flags &= ~PF_REMOTE;
>  			ttyflush(tp, FREAD|FWRITE);
>  			return (0);
> +		}
> +
> +		/*
> +		 * The rest of the ioctls shouldn't be called until 
> +		 * the slave is open. (Should we return an error?)
> +		 */
> +		if ((tp->t_state & TS_ISOPEN) == 0)
> +			return (0);
>  
> +		switch (cmd) {
>  #ifdef COMPAT_43
>  		case TIOCSETP:
>  		case TIOCSETN:
> @@ -735,6 +743,7 @@
>  				ttyinfo(tp);
>  			return(0);
>  		}
> +	}
>  	error = (*linesw[tp->t_line].l_ioctl)(tp, cmd, data, flag, p);
>  	if (error == ENOIOCTL)
>  		 error = ttioctl(tp, cmd, data, flag);



-- 

*-*-*-*-*-*-*-*-*-*-*-*-*-*-*-*-*-*-*-*-*-*-*-*-*-*-*-*-*-*
| Matthew Fuller    MF4839    http://www.over-yonder.net/ |
* fullermd@futuresouth.com       fullermd@over-yonder.net *
| UNIX Systems Administrator      Specializing in FreeBSD |
*   FutureSouth Communications   ISPHelp ISP Consulting   *
|  "The only reason I'm burning my candle at both ends,   |
*    is because I haven't figured out how to light the    *
|                     middle yet"                         |
*-*-*-*-*-*-*-*-*-*-*-*-*-*-*-*-*-*-*-*-*-*-*-*-*-*-*-*-*-*


To Unsubscribe: send mail to majordomo@FreeBSD.org
with "unsubscribe freebsd-current" in the body of the message




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