Is this a logout ?
Phil Nicholson
phil at medici.trl.OZ.AU
Fri Mar 8 18:06:59 AEST 1991
In article <1991Mar6.120728.10069 at daimi.aau.dk>, ezra at daimi.aau.dk
(Thomas Ravnholt) writes:
> The question: How can I decide if it is a logout from
> the rlogin.
This works for me.
In your .logout have (with csh)
if(`tty` !~ /dev/tty[pqr]* ) then
#not a pseudo tty, so presumably not an rlogin or telnet etc.
commands...
endif
Roll your own if you use a different shell.
Alternatively, you could awk your way through the output of ps to find out
if the parent of the current process is in.rlogind.
But this approach varies from one unix to another.
Phillip Nicholson AI Systems Telecom Australia Research Labs
email : p.nicholson at trl.oz.au
phone : +61 3 541 6245
fax : +61 3 543 8863
More information about the Comp.unix.questions
mailing list