Article View: comp.windows.x
Article #25135Shell script for killing uwm
From: Timothy.Freeman
Date: Mon, 16 Feb 1987 05:18
Date: Mon, 16 Feb 1987 05:18
27 lines
1343 bytes
1343 bytes
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?
Technical Details
Message-ID:
<8702161503.AA26818@ATHENA>Path:
arc1-ca.pugleaf.net!utzoo!watmath!clyde!rutgers!mit-eddie!genrad!decvax!ucbvax!THEORY.CS.CMU.EDU!Timothy.FreemanShow Full Headers
Complete Article Headers
Relay-Version: version B 2.10 5/3/83; site utzoo.UUCP Path: arc1-ca.pugleaf.net!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