.logout for ksh?
Tim J Ihde
tim at attdso.ATT.COM
Wed Oct 5 23:41:20 AEST 1988
In article <1529 at nunki.usc.edu> connet at castor.usc.edu (David Connet) writes:
>In article <415 at motbos.UUCP> artp at motbos.UUCP (Art Parmet) writes:
>>trap "/local/bin/logoff" 0
>Ummm, you had better add an exit in the trap, or after executing
>/local/bin/logoff, you get your prompt back.
>This is what I do:
> trap "logout;clear;exit" 0 3
Eh? I've had
trap '$HOME/.logout' 0
in my profile through several versions of ksh, and I never see my prompt
back. If you trap with a signal number >0, then when the signal is
received the trap is executed and the shell resumes (so you would need
an exit); but signal number 0 is a special case:
If 'n' is 0 then the command 'arg' is executed
_on_exit_from_the_shell._ (User's Manual)
So the 0 trap is run during the exit, but does not interrupt the exit.
--
Tim J Ihde UUCP: att!attdso!tim
(201) 898-6687 INTERNET: tim at attdso.att.com
"Blimey - this redistribution of wealth is more complicated than I'd thought!"
- Dennis Moore and misc. Presidents
More information about the Comp.unix.wizards
mailing list