*BSD News Article 25721


Return to BSD News archive

Path: sserve!newshost.anu.edu.au!munnari.oz.au!news.Hawaii.Edu!ames!agate!howland.reston.ans.net!cs.utexas.edu!swrinde!menudo.uh.edu!uuneo.NeoSoft.com!nobody
From: smace@metal.neosoft.com (Scott Mace)
Newsgroups: comp.os.386bsd.questions
Subject: THE END PLEASE (tcsh woes again ....)
Date: 7 Jan 1994 20:45:51 -0600
Organization: Mace Communications
Lines: 170
Message-ID: <2gl6ph$bh@metal.neosoft.com>
References: <CJ3BoJ.FCn@usenet.ucs.indiana.edu> <STARK!GENE.94Jan4180952@stark.uucp>
NNTP-Posting-Host: metal.neosoft.com

OK folks, lets end this thread once and for all.

On Fri, Nov 12 1993 Andrew A. Chernov made the following commit on freefall:

>Date: Fri, 12 Nov 1993 16:19:23 -0800
>To: cvs-commit
>Subject: freefall commit: '386BSD/src/sys/kern tty_conf.c'
>
>Update of /a/cvs/386BSD/src/sys/kern
>In directory freefall.cdrom.com:/a/ache/work/kernel/kern
>
>Modified Files:
>        tty_conf.c 
>Log Message:
>Restore NTTYDISC discipline entry (it is equal to TTYDISC entry now).
>Our POSIX discipline looks like NTTYDISC more than like OTTYDISC.

THIS FIXES THE TCSH NO JOB CONTROL BUG!!!!!!

If your kernel sources predate this commit then the current tcsh packages
on freebsd.cdrom.com will give you the no job control error.

IF AND ONLY IF, your kernel predates this update, will the following patch
to the tcsh sources temporarily patch the problem.  The real fix,
is to install a kernel that has the tty_conf.c fix.

NOTE, all that I did was change all occurances of NTTYDISC to TTYDISC

*** ed.init.c.orig	Fri Jan  7 20:25:04 1994
--- ed.init.c	Fri Jan  7 20:25:16 1994
***************
*** 233,239 ****
      extty.d_t.c_lflag |=  ttylist[EX_IO][M_LINED].t_setmask;
  
  # if defined(IRIX3_3) && SYSVREL < 4
!     extty.d_t.c_line = NTTYDISC;
  # endif /* IRIX3_3 && SYSVREL < 4 */
  
  #else	/* GSTTY */		/* V7, Berkeley style tty */
--- 233,239 ----
      extty.d_t.c_lflag |=  ttylist[EX_IO][M_LINED].t_setmask;
  
  # if defined(IRIX3_3) && SYSVREL < 4
!     extty.d_t.c_line = TTYDISC;
  # endif /* IRIX3_3 && SYSVREL < 4 */
  
  #else	/* GSTTY */		/* V7, Berkeley style tty */
***************
*** 326,332 ****
  
  
  # if defined(IRIX3_3) && SYSVREL < 4
!     edtty.d_t.c_line = NTTYDISC;
  # endif /* IRIX3_3 && SYSVREL < 4 */
  
  #else /* GSTTY */
--- 326,332 ----
  
  
  # if defined(IRIX3_3) && SYSVREL < 4
!     edtty.d_t.c_line = TTYDISC;
  # endif /* IRIX3_3 && SYSVREL < 4 */
  
  #else /* GSTTY */
*** tc.disc.c.orig	Fri Jan  7 20:25:30 1994
--- tc.disc.c	Fri Jan  7 20:25:54 1994
***************
*** 61,69 ****
  char    strPOSIX[] = "posix";
  #endif	/* _IBMR2 */
  
! #if !defined(HAVE_DISC) && defined(TIOCGETD) && defined(NTTYDISC)
  static int oldisc;
! #endif /* !HAVE_DISC && TIOCGETD && NTTYDISC */
  
  int
  /*ARGSUSED*/
--- 61,69 ----
  char    strPOSIX[] = "posix";
  #endif	/* _IBMR2 */
  
! #if !defined(HAVE_DISC) && defined(TIOCGETD) && defined(TTYDISC)
  static int oldisc;
! #endif /* !HAVE_DISC && TIOCGETD && TTYDISC */
  
  int
  /*ARGSUSED*/
***************
*** 80,87 ****
      if (ioctl(f, TCGETA, (ioctl_t) & termiob) == 0) {
  	otermiob = termiob;
  #if (SYSVREL < 4) || !defined(IRIS4D)
! 	if (termiob.c_line != NTTYDISC || termiob.c_cc[VSWTCH] == 0) { /*}*/
! 	    termiob.c_line = NTTYDISC;
  #else
  	if (termiob.c_cc[VSWTCH] == 0) {
  #endif
--- 80,87 ----
      if (ioctl(f, TCGETA, (ioctl_t) & termiob) == 0) {
  	otermiob = termiob;
  #if (SYSVREL < 4) || !defined(IRIS4D)
! 	if (termiob.c_line != TTYDISC || termiob.c_cc[VSWTCH] == 0) { /*}*/
! 	    termiob.c_line = TTYDISC;
  #else
  	if (termiob.c_cc[VSWTCH] == 0) {
  #endif
***************
*** 153,162 ****
  #endif	/* _IBMR2 */
  
  #ifndef HAVE_DISC
! # if defined(TIOCGETD) && defined(NTTYDISC)
      if (ioctl(f, TIOCGETD, (ioctl_t) & oldisc) == 0) {
! 	if (oldisc != NTTYDISC) {
! 	    int     ldisc = NTTYDISC;
  
  	    if (ioctl(f, TIOCSETD, (ioctl_t) & ldisc) != 0)
  		return (-1);
--- 153,162 ----
  #endif	/* _IBMR2 */
  
  #ifndef HAVE_DISC
! # if defined(TIOCGETD) && defined(TTYDISC)
      if (ioctl(f, TIOCGETD, (ioctl_t) & oldisc) == 0) {
! 	if (oldisc != TTYDISC) {
! 	    int     ldisc = TTYDISC;
  
  	    if (ioctl(f, TIOCSETD, (ioctl_t) & ldisc) != 0)
  		return (-1);
***************
*** 170,176 ****
  	return (-1);
  # else
      return (0);
! # endif	/* TIOCGETD && NTTYDISC */
  #endif	/* !HAVE_DISC */
  } /* end setdisc */
  
--- 170,176 ----
  	return (-1);
  # else
      return (0);
! # endif	/* TIOCGETD && TTYDISC */
  #endif	/* !HAVE_DISC */
  } /* end setdisc */
  
***************
*** 191,199 ****
  #endif /* _IBMR2 */
  
  #ifndef HAVE_DISC
! # if defined(TIOCSETD) && defined(NTTYDISC)
  	return (ioctl(f, TIOCSETD, (ioctl_t) & oldisc));
! # endif /* TIOCSETD && NTTYDISC */
  #endif /* !HAVE_DISC */
      }
      return (0);
--- 191,199 ----
  #endif /* _IBMR2 */
  
  #ifndef HAVE_DISC
! # if defined(TIOCSETD) && defined(TTYDISC)
  	return (ioctl(f, TIOCSETD, (ioctl_t) & oldisc));
! # endif /* TIOCSETD && TTYDISC */
  #endif /* !HAVE_DISC */
      }
      return (0);

--
Scott