Skip site navigation (1)Skip section navigation (2)
Date:      Sat, 27 May 2000 11:18:22 -0400
From:      mwhalen@uucom.com
To:        stable@FreeBSD.ORG
Subject:   Re: killall question 
Message-ID:  <200005271518.LAA14294@tangerine.uucom.com>
In-Reply-To: Message from John Baldwin <jhb@FreeBSD.ORG>  of "Sat, 27 May 2000 10:49:20 EDT." <20000527144920.WNSL22611.mail.rdc1.va.home.com@john.baldwin.cx> 

next in thread | previous in thread | raw e-mail | index | archive | help
I think I heard John Baldwin say:
>
>On 27-May-00 Randall Hopper wrote:
>> housley@thehousleys.net:
>>  |Randall Hopper <aa8vb@nc.rr.com> 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




Want to link to this message? Use this URL: <https://mail-archive.FreeBSD.org/cgi/mid.cgi?200005271518.LAA14294>