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: Re: Help: tcsh doesn't work with FreeBSD Date: 6 Feb 1994 21:29:21 -0600 Organization: NeoSoft (Katy Research Center) Lines: 181 Message-ID: <2j4cj3$1fk@metal.neosoft.com> References: <ghGh_3u00WB9Mfv3Yj@andrew.cmu.edu> <g89r4222.760173574@kudu> NNTP-Posting-Host: metal.neosoft.com In article <g89r4222.760173574@kudu>, Geoff Rehmet <g89r4222@kudu.ru.ac.za> wrote: >In <ghGh_3u00WB9Mfv3Yj@andrew.cmu.edu> "N. R. Natraj" <nn07+@andrew.cmu.edu> writes: > >>I have FreeBSD 1.0.2 running on my machine and when I start tcsh I get >>the following > >>Warning: no access to tty (Operation not supported by device). >>Thus no job control in this shell. > Not this thread again... I kept this reply around just in case someone asked this again. 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 newer kernel. 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