From owner-freebsd-stable Sat May 27 8:17:42 2000 Delivered-To: freebsd-stable@freebsd.org Received: from bman.uucom.com (bman.uucom.com [198.202.217.19]) by hub.freebsd.org (Postfix) with ESMTP id 561E637B8B7 for ; Sat, 27 May 2000 08:17:38 -0700 (PDT) (envelope-from dakota@tangerine.uucom.com) Received: from tangerine.uucom.com (tangerine.uucom.com [198.202.217.38]) by bman.uucom.com (8.9.3/8.9.3/990218bjb) with ESMTP id LAA22481 for ; Sat, 27 May 2000 11:17:37 -0400 (EDT) Received: from tangerine (localhost [127.0.0.1]) by tangerine.uucom.com (8.9.3+Sun/8.9.3) with ESMTP id LAA14294 for ; Sat, 27 May 2000 11:18:22 -0400 (EDT) Message-Id: <200005271518.LAA14294@tangerine.uucom.com> X-Mailer: exmh version 2.1.1 10/15/1999 To: stable@FreeBSD.ORG From: mwhalen@uucom.com Subject: Re: killall question In-Reply-To: Message from John Baldwin of "Sat, 27 May 2000 10:49:20 EDT." <20000527144920.WNSL22611.mail.rdc1.va.home.com@john.baldwin.cx> Mime-Version: 1.0 Content-Type: text/plain; charset=us-ascii Date: Sat, 27 May 2000 11:18:22 -0400 Sender: owner-freebsd-stable@FreeBSD.ORG Precedence: bulk X-Loop: FreeBSD.ORG I think I heard John Baldwin say: > >On 27-May-00 Randall Hopper wrote: >> housley@thehousleys.net: >> |Randall Hopper said: >> | >> |> I have a script I run named "newroot". I want to kill it with killall. >> |> >> |> > ps -ax | grep newroot >> |> 842 1 rhh /bin/sh /home/rhh/bin/newroot 360 >> |> >> |You will have to do something like >> | >> |kill `ps -ax | grep newroot | sed -e '^[0-9]*'` >> >> Ok. I thought I'd at least try to use the system version, but sounds like >> it's just not as flexible as killall's on other systems. IMHO, killall is a terrible script to use since it's behavior is so different on different machines. I've seen newbie sysadmins do bad things with killall on my Solaris machines: Here is the start of Solaris' manpage: DESCRIPTION killall is used by shutdown(1M) to kill all active processes not directly related to the shutdown procedure. killall terminates all processes with open files so that the mounted file systems will be unbusied and can be unmounted. killall sends signal (see kill(1)) to the active processes. If no signal is specified, a default of 15 is used. As you can see, when they type 'killall netscape' when they are r00t, everything gets killed. -matthew To Unsubscribe: send mail to majordomo@FreeBSD.org with "unsubscribe freebsd-stable" in the body of the message