.logout functionality using ksh <was: A few questions>
Wm E. Davidsen Jr
davidsen at sixhub.UUCP
Fri Dec 14 02:38:14 AEST 1990
In article <175 at raysnec.UUCP> shwake at raysnec.UUCP (Ray Shwake) writes:
| The approach I've used successfully involves trapping the logout
| signal (signal 0). Example:
|
| trap 'tput clear; exit' EXIT
I use ksh, but the technique is the same, mostly. Since I want to
catch ALL catchable signals, and may want to take action on them in the
logout, my setup looks like this.
for n in 0 1 3 15; do
trap "$HOME/.logout $n" $n
done
The .logout ends with an exit, and I can take special action on
various signals if I wish. Since I may be in on many virtual terminals
and run SysV variants on most machines, I leave with "kill -1 -1" to
kill all processes in the system owned by me. Ugly but effective.
--
bill davidsen - davidsen at sixhub.uucp (uunet!crdgw1!sixhub!davidsen)
sysop *IX BBS and Public Access UNIX
moderator of comp.binaries.ibm.pc and 80386 mailing list
"Stupidity, like virtue, is its own reward" -me
More information about the Comp.unix.shell
mailing list