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/ | * fulle...@futuresouth.com fulle...@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 majord...@freebsd.org with "unsubscribe freebsd-current" in the body of the message