Relay-Version: version B 2.10 5/3/83; site utzoo.UUCP Path: utzoo!watmath!clyde!rutgers!mit-eddie!genrad!decvax!ucbvax!THEORY.CS.CMU.EDU!Timothy.Freeman From: Timothy.Freeman@THEORY.CS.CMU.EDU.UUCP Newsgroups: comp.windows.x Subject: Shell script for killing uwm Message-ID: <8702161503.AA26818@ATHENA> Date: Mon, 16-Feb-87 00:18:22 EST Article-I.D.: ATHENA.8702161503.AA26818 Posted: Mon Feb 16 00:18:22 1987 Date-Received: Tue, 17-Feb-87 05:46:21 EST Sender: daemon@ucbvax.BERKELEY.EDU Organization: The ARPA Internet Lines: 27 Here's a little shell script we use to kill uwm when we want to. We tell uwm to invoke it when we select "quit" from a menu. #! /bin/csh -f # # Author: Tim Freeman, with thanks to Frank Pfenning # set FINDPROC = /usr/local/lib/uwmproc.awk set uwmproc = `ps -acx | awk -f $FINDPROC` if ($uwmproc == "") then echo "No window manager found.">/dev/tty else kill -9 $uwmproc if ( $status == 1 ) then echo "Failed to kill window manager.">/dev/tty endif endif Here's the file /usr/local/lib/uwmproc.awk: $5 == "uwm" { print $1 } I could have changed uwm to have a f.quit, but this this has the advantage that we will probably be able to move to the next version of X without having to install our own changes. It would be better if uwm had a f.quit, right?