Killing mex

S H Willson willson at GREMLIN.NRTC.NORTHROP.COM
Fri Nov 18 08:14:17 AEST 1988


    How can I kill mex automatically when logging out (like something in the
    .logout file) ? If mex is left running, anyone can come along and start
    a new shell as the old user -- doesn't this seem to be a real problem ?!

    Thanx

Here is a copy of my .logout.  It does what you want provided you don't
have any extra text windows around (i.e., more than the console window).

-- cut here --
if ($term == wsiris) clear
ismex
if ($status == 1 && `tty` == "/dev/console") then
	# Kill off mex the hard way
	# This still doesn't get rid of any textports!  *Sigh*
	(sleep 2; kill -9 ` ps x | grep 'mex$' | awk '{print $1}' `) &
endif
echo -n "logout " $user " "; date;
-- cut here --

Stephen Willson
Northrop Research and Technology Center
Palos Verdes, CA  90274



More information about the Comp.sys.sgi mailing list