Auto-logoff facility in Unix

Doug Gwyn gwyn at brl-vgr.ARPA
Sat May 12 15:35:49 AEST 1984


sh TIMEOUT was already present when I arrived at BRL, so I am not
sure of all the reasons for doing it this way.  One major factor I
am sure of is that the shell has the information it needs to decide
that the user has fallen asleep (lack of response to PS1), whereas
any other approach to logging off an idle terminal would seem to
involve peeking inside the kernel or running "ps" periodically to
see whether anything had been accomplished by the user's processes
recently.  Doing this in the shell seems cleaner.

Note that this is not intended to be an absolute guarantee that an
idle terminal will be forced to log off, and we even let the user
choose the timeout interval or turn off the feature altogether.

The sh TIMEOUT is not foolproof, since &-detached processes are not
checked and may therefore get sent a SIGHUP when the shell times out.
This could obviously be fixed, but it seems to be a rare problem
given that the default timeout interval is 30 minutes and that we
have a BATCH facility (part of the MDQS spooling system, works
really well).



More information about the Comp.unix.wizards mailing list