Skip site navigation (1)Skip section navigation (2)
Date:      Wed, 14 Jul 1999 12:17:53 -0700
From:      "Childers, Richard" <RCHILDER@hamquist.com>
To:        "'Anil Jangity '" <aj@entic.net>, "Childers, Richard" <RCHILDER@hamquist.com>
Cc:        "''freebsd-security@freebsd.org ' '" <freebsd-security@freebsd.org>
Subject:   RE: weird w report?
Message-ID:  <D57D3E9BF7C1D211884400805F77AC7DFE37E8@sf1-mail01>

next in thread | raw e-mail | index | archive | help

Anil notes:

    "kill -9 -1"


Umm, why are you doing a "kill -9 -1" ?

There is no process ID "-1".

I see that the man page for 'kill' describes a usage '-1' where '-1' is a
special PID that translates as 'send the signal to all processes' if you are
logged in as "root"; you probably don't want to do this.  (-:

Which is why you su'd to the userid, I am speculating ... it seems intuitive
that a user would be able to kill his own processes, but sometimes things
are such that killing the process as "root" is preferred; in fact, trying to
kill the process and not being successful can lead to the process becoming
zombie'd, which is why I advise killing PIDs from "root".

Try killing the process ID, as "root" :

     kill -9 #####

... where ##### is the process ID reported by something like

     ps -aux | grep drenica

... where the first column is the userid, and the second column is the
process ID.

You may find it useful to search for all process IDs owned by that userid,
sort them in reverse numeric order (IE, highest to lowest) and kill them in
that reversed order; this is because the process ID roughly indicates
ordinal sequence, such that killing them in the order of their process ID,
reversed, one is killing processes in the reverse order they were started,
in this fashion avoiding killing parent processes before child processes
(which results in zombie processes).

For example:

    # csh
    root@spawn.vax.com # ps -aux | grep drenica | grep -v grep \
        | awk ' { print $2 }' | sort -rn > /tmp/badpids
    root@spawn.vax.com # foreach pid ( `cat /tmp/badpids` )
    ?   echo "killing $pid" && kill -9 ${pid}
    ? end
    root@spawn.vax.com #


Hope this provides some insight ...


-- richard




To Unsubscribe: send mail to majordomo@FreeBSD.org
with "unsubscribe freebsd-security" in the body of the message




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