*BSD News Article 25716


Return to BSD News archive

Path: sserve!newshost.anu.edu.au!munnari.oz.au!bunyip.cc.uq.oz.au!harbinger.cc.monash.edu.au!yeshua.marcam.com!usc!howland.reston.ans.net!europa.eng.gtefsd.com!uunet!nntp.club.cc.cmu.edu!godot.cc.duq.edu!toads.pgh.pa.us!w2xo!durham
From: durham@w2xo.pgh.pa.us (Jim Durham)
Newsgroups: comp.os.386bsd.questions
Subject: tcsh hack
Keywords: tcsh
Message-ID: <18@w2xo.pgh.pa.us>
Date: 8 Jan 94 03:55:38 GMT
Lines: 36


Here is a work-around for FreeBSD 1.02 and the "tcsh" problem.

In sh.c, about line 908, there is a call to "setdisc", which sets
the line discipline for the tty.

In FreeBSD, this test fails and you get the error message that
you have no job control, etc.

I found, experimentally, that if you just ignore the bad error
return, it works fine... It's not a fix.. just a work-around
until I or someone gets more time to change "setdisc" so that
it works with FreeBSD..

Here's a fast fix..

1. Define "FREEBSD" in the Makefile CFLAGS.

2. Put the following kludge into sh.c

#ifdef FREEBSD
		if (setdisc(f) == -1) {
#else
		if (setdisc(f) != -1) {
#endif


This works just fine for me and shows no funny effects whatsoever.
Good Luck..

-Jim Durham