Subject: TIOCSTAT & tcsh
To: None <current-users@sun-lamp.cs.berkeley.edu>
From: Luke Mewburn <lm@rmit.edu.au>
List: current-users
Date: 02/09/1994 10:15:59
After compiling tcsh-6.04 I noticed that the load average function doesn't
work in current from the prompt. When you're running a command, it works
fine, but not actually at the prompt.

At first I thought that tcsh had been changed between 6.03 and 6.04 but
this doesn't appear to be the case, cause the othersrc version of 6.03
has the same fault. So I begin to suspect the kernel.

Hunting around, I found the TIOCSTAT handling code in kern/tty.c that
I think I ported to 0.8 or 0.9 many moons ago. Back then, it worked :)
So, has that code been changed? I suspect that the while loop in that
code that checks if the ioctl involves modification thinks that the
tcsh prompt is in the background. I need to investigate further to
confirm this.

(tcsh is in raw mode, so it does a ioctl(.., TIOCSTAT, ..) directly on
an fd that appears to be stdin, but this fails.)

This isn't a major problem, but I was wondering if anyone out there
can suggest a fix.


On another note, I've got tcsh-6.04 (as shipped from tesla.ee.cornell.edu)
up & running, with only a minor modification to tc.vers.c (to define
$HOSTTYPE) The $HOSTTYPE variable gets set to the following, depending
on your architecture: NetBSD/amiga, NetBSD/hp300, NetBSD/i386, NetBSD/mac68k,
NetBSD/pc532, NetBSD/pmax, NetBSD/sparc, NetBSD/sun3, NetBSD/m68k (if it's
68k based and not amiga nor mac), NetBSD (none of the above.) The manual
has been changed appropriately.

Where can I put the source so that it can be used to replace the earlier
version being shipped in othersrc?

PS: I found it kinda humourous that the maintainer of tcsh hasn't nagged you
guys to upgrade to 6.04 when he's a frequent poster to this list :) :) :)
I spose we're all too busy at times.


-- 
Luke Mewburn, <lm@rmit.edu.au>

------------------------------------------------------------------------------