TMOUT variable in ksh

From: Matt Moore <moore_at_shemp.bucks.edu>
Date: Thu, 28 May 1998 16:03:35 -0400 (EDT)

Please excuse me if this is a dumb question but I'm not a big korn
shell user... I'm having trouble getting the TMOUT variable to work
from .profile. If I type TMOUT=60 at the shell prompt it works as
advertised and exits the shell in 60 seconds, however if I put the
same line in .profile (whether exported or not) it seems to be ignored
and the variable is set to zero. I also tried setting the variable in
.kshrc and using ENV=$HOME/.kshrc in .profile to no avail. However if
type . .kshrc it works. What I would ultimately like to do is use this in
a menu script but my attempts so far have failed, such as:

#!/bin/ksh
TMOUT=3600
export TMOUT
while :
do
 read something
done

Am I reading the manual pages and not understanding what they are saying?
Or is there a better way of doing this? BTW - ksh IS the default shell
and all the other stuff I'm doing in .profile and .kshrc is working.
Thanks for all your help.

-----------------------------------------------------------------------
Matt Moore N3LPH Bucks County Community College
E-mail: moorem_at_bucks.edu Swamp Road Newtown PA 18940
-----------------------------------------------------------------------
Windows 95: A 32-bit patch for a 16-bit GUI shell running on top of an
8-bit operating system written for a 4-bit processor by a 2-bit company
who cannot stand 1 bit of competition.
Received on Thu May 28 1998 - 22:04:25 NZST

This archive was generated by hypermail 2.4.0 : Wed Nov 08 2023 - 11:53:37 NZDT