ksh named parameter, question

Lawrence V. Cipriani lvc at cbnews.ATT.COM
Fri Feb 17 00:11:00 AEST 1989


In article <254 at ai.etl.army.mil>, richr at ai.etl.army.mil (Richard Rosenthal) writes:
>     Can someone explain this behavior in ksh on both B4.3 and SysV?
>     $ typeset TMOUT
>     integer TMOUT

You are asking ksh to tell you the type and attributes of TMOUT, so it
told you.

>     $ print $TMOUT
>     0

The current value of TMOUT is 0.

>     $ typeset TMOUT=
>     $ print $TMOUT
>     92328

According to the ksh book, this is not a legal form.  My opinion is that
you should get a syntax error message, however ksh sets it to some garbage
value.  The version of ksh I'm working with now sets it to 0.

>     $ typeset TMOUT=0
>     $ print $TMOUT
>     0
> 
>     On another machine TMOUT magically becomes 4 instead of 92328
>     and that is a real problem!  Then I constantly get 60 second
>     timeout warnings.

Like I said, some "garbage" value.  Don't count on this behavior.  Execute:

	$ TMOUT=3600

and you'll only get the warning after an hour (3600 seconds) of inactivity.
If that's too short, set it to something higher.  There is a maximum value
of TMOUT compiled into ksh.  Setting TMOUT higher than that will result in
it being set to the maximum value.
-- 

Larry Cipriani, att!cbnews!lvc or lvc at cbnews.att.com



More information about the Comp.unix.questions mailing list