Skip site navigation (1)Skip section navigation (2)
Date:      Mon, 1 Sep 2008 12:11:21 +0200
From:      "Alexey Shuvaev" <shuvaev@physik.uni-wuerzburg.de>
To:        Ed Schouten <ed@80386.nl>
Cc:        freebsd-current@freebsd.org
Subject:   Re: csh history and pts
Message-ID:  <20080901101121.GC4083@wep400x.physik.uni-wuerzburg.de>
In-Reply-To: <871w04syfw.fsf@kobe.laptop>
References:  <48BAD085.1090507@gmail.com> <20080831200950.GF99951@hoeg.nl> <871w04syfw.fsf@kobe.laptop>

next in thread | previous in thread | raw e-mail | index | archive | help
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@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.



Want to link to this message? Use this URL: <https://mail-archive.FreeBSD.org/cgi/mid.cgi?20080901101121.GC4083>