Re: csh history and pts

From: Alexey Shuvaev <shuvaev_at_physik.uni-wuerzburg.de>
Date: Mon, 1 Sep 2008 12:11:21 +0200
On Sun, Aug 31, 2008 at 11:48:35PM +0300, Giorgos Keramidas wrote:
> 
> Yes, a bit of background is probably going to be useful...
> 
> tcsh enables autologout automatically to a default of 60 seconds in the
> following cases:
> 
>     Set to `60' (automatic logout after 60 minutes, and no
>     locking) by default in login and superuser shells, but not if
>     the shell thinks it is running under a window system (i.e.,
>     the DISPLAY environment variable is set), the tty is a
>     pseudo-tty (pty) or the shell was not so compiled (see the
>     version shell variable).
> 
> The `contrib/tcsh/sh.c' code implements this near line 456:
> [snip]
> 
> I have an IRC log from scottl noting that he still got the default 60
> second autologout, but this was on 6.X IIRC:
> 
> * scottl__ tries to remember how to turn off auto-logout
> <motminh> scottl__: tcsh option - I guess tcsh can no longer determin
>   activity post TTY?
> <keramida> scottl__: I remember Kris mentioning an mpsafetty & tcsh
>   issue.  I haven't had the time to go back and check if the pty-detection
>   we fixed with kern.pts.enable=1 still works after mpsafetty
> <motminh> scottl__:  what does echo $autologout say?
> <scottl__> [y1] ~> echo $autologout
> <scottl__> 60
> <scottl__> on a 6.3 machine, I get
> <scottl__> pooker] ~> echo $autologout
> <scottl__> autologout: Undefined variable.
> 
> I can't reproduce this with a current from Aug 29, but this snapshot has
> been built with the experimental 'packet mode' patch, and a few other
> local changes, so I will have to try with a clean /head/ snapshot.
> 
FWIW:
In xterm:

~> uname -a
FreeBSD wep400x.physik.uni-wuerzburg.de 8.0-CURRENT FreeBSD 8.0-CURRENT #0: Sun Aug 31 16:30:20 CEST 2008     root_at_wep400x.physik.uni-wuerzburg.de:/usr/obj/usr/src/sys/GENERIC  amd64
~> echo $autologout
autologout: Undefined variable.
~> su -
Password:
# echo $autologout
60

In the console (I think ttyv*) autologout is not defined for both
normal user and root.

Finally,
~> echo $version
tcsh 6.15.00 (Astron) 2007-03-03 (unknown-unknown-FreeBSD) options wide,nls,dl,al,kan,sm,rh,color,filec

Back to original post, I confirm that [t]csh loses history after shutdown(8).

My 0.02$,
Alexey.
Received on Mon Sep 01 2008 - 08:11:25 UTC

This archive was generated by hypermail 2.4.0 : Wed May 19 2021 - 11:39:34 UTC