From owner-freebsd-current Fri May 14 12:12:18 1999 Delivered-To: freebsd-current@freebsd.org Received: from shell.futuresouth.com (shell.futuresouth.com [198.78.58.28]) by hub.freebsd.org (Postfix) with ESMTP id 9135414E18 for ; Fri, 14 May 1999 12:12:13 -0700 (PDT) (envelope-from fullermd@futuresouth.com) Received: (from fullermd@localhost) by shell.futuresouth.com (8.9.3/8.9.3) id OAA21292; Fri, 14 May 1999 14:11:52 -0500 (CDT) Date: Fri, 14 May 1999 14:11:52 -0500 From: "Matthew D. Fuller" To: Luoqi Chen 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> References: <199905141736.NAA06376@lor.watermarkgroup.com> Mime-Version: 1.0 Content-Type: text/plain; charset=us-ascii X-Mailer: Mutt 0.95.3i In-Reply-To: <199905141736.NAA06376@lor.watermarkgroup.com>; from Luoqi Chen on Fri, May 14, 1999 at 01:36:41PM -0400 X-OS: FreeBSD Sender: owner-freebsd-current@FreeBSD.ORG Precedence: bulk X-Loop: FreeBSD.ORG 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