[3529] in testers

home help back first fref pref prev next nref lref last post

Re: stty run from cshrc on .logout invocation

daemon@ATHENA.MIT.EDU (Robert A Basch)
Thu Jun 4 12:15:16 1998

To: Greg Hudson <ghudson@MIT.EDU>
Cc: testers@MIT.EDU, source-developers@MIT.EDU
In-Reply-To: Your message of "Tue, 02 Jun 1998 17:34:16 EDT."
             <199806022134.RAA15025@small-gods.MIT.EDU> 
Date: Thu, 04 Jun 1998 12:15:10 EDT
From: Robert A Basch <rbasch@MIT.EDU>

> I dunno yet what platforms this bug exists on or if it existed in 8.1.
> But basically, if you log out of an 8.2 Indy and have a .logout file,
> you get a stty error, presumably from the stty invocation in the
> default cshrc file.  This sort of implies that prompt is set, although
> I have no idea why that would be.

I see the same thing on an 8.1 Indy.  I think it's caused by the way
tcsh is invoked by session_gate, i.e. with .logout on standard input.
(stty operates on descriptor 0).  You see the same error if you run
tcsh with input redirected; it's questionable for it to set prompt in
this case, but csh also does it.

Anyone know why the stty is done in cshrc?  The code reads:

# Have no better way to do this at the moment.
if ($?prompt) then
  stty sane intr ^C
endif

(The Sun cshrc doesn't do this...).

Assuming we do need the stty, probably the best thing to do is add a
test here for the standard input being a terminal, using 'tty -s'.
I'll add this if people agree...

Bob



home help back first fref pref prev next nref lref last post