Re: killall and afterstep

Kris Kennaway (kkennawa@physics.adelaide.edu.au)
Mon, 11 Jan 1999 12:32:12 +1030 (CST)


On Sun, 10 Jan 1999, Kevin Maguire wrote:

> killall, in /sbin on Digital Unix, has a completely different syntax
> than on Linux.  I tried compiling killall from sources, but the /proc

This is a big gotcha between different UNIX versions. Never assume that
killall will do what you think it will, especially if you're running as root
:-) In general it's not a tool for general-purpose system administration, on
any system - even the Linux/BSD versions which match on process names will
often nuke more than you bargained for unless you're careful.

> filesystems on Linux/Digital Unix are probably quite different and it
> just doesn't work.

Or, in general, Linux/anything else :-)

> So now I have to manually kill the first xlock process before I try
> another animation for the 1-2-3 menus.  Is there a "portable" killall,
> I'm sure some sort of perl/awk/shell script involving ps could be
> hacked togther reasonably easily.

If you're doing this a lot, the best thing is probably to hand-craft something
and parse the output of 'ps' (although again you'll run into differences in
options and output formats). Alternatively, use an xlock.pid file to store the
PID of the process when you start it, for easy reference later.

Kris

-----
(ASP) Microsoft Corporation (MSFT) announced today that the release of its 
productivity suite, Office 2000, will be delayed until the first quarter
of 1901.


--
   WWW:   http://www.afterstep.org/
   FTP:   ftp://ftp.afterstep.org/
   MAIL:  http://www.caldera.com/linuxcenter/forums/afterstep.html