Skip site navigation (1)Skip section navigation (2)
Date:      Wed, 16 Nov 2005 12:59:00 +0100
From:      Pawel Jakub Dawidek <pjd@FreeBSD.org>
To:        Andrey Chernov <ache@freebsd.org>, src-committers@FreeBSD.ORG, cvs-src@FreeBSD.ORG, cvs-all@FreeBSD.ORG
Subject:   Re: cvs commit: src/usr.bin/pkill pkill.c
Message-ID:  <20051116115900.GA7992@garage.freebsd.pl>
In-Reply-To: <20051116112419.GA1363@nagual.pp.ru>
References:  <200511161103.jAGB30d4062758@repoman.freebsd.org> <20051116112419.GA1363@nagual.pp.ru>

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

--RnlQjJ0d97Da+TV1
Content-Type: text/plain; charset=iso-8859-2
Content-Disposition: inline
Content-Transfer-Encoding: quoted-printable

On Wed, Nov 16, 2005 at 02:24:19PM +0300, Andrey Chernov wrote:
+> On Wed, Nov 16, 2005 at 11:03:00AM +0000, Pawel Jakub Dawidek wrote:
+> >   - If a process dissappears while we are signalling it, don't count i=
t as a
+> >     match/error.
+>=20
+> I don't understand "match" part here, but can say something about "error=
"=20
+> part: while it looks reasonable, it is wrong direction move. What about=
=20
+> special signals handling? TSTP, HUP, USR1, etc? It should be restricted =
to=20
+> KILL signal only, since it can't be trapped. Ever ILL should produce som=
e=20
+> warning when process dissappears, since usually dumps core.

Not sure if I understand, but I'll at least try to explain the change.

Let's say you call 'pkill sleep'. First it creates list of the matching
processes and when the list is done, it starts killing processes from
the list. When there is a race, so that process was inserted into the
list, but disappeared before killing, pkill(1) will quit with an error.
Which is bogus: there were 8 sleep processes, the 5th one disappeared,
so first 4 was killed, last 3 are still alive and pkill(1) returned an
error.

--=20
Pawel Jakub Dawidek                       http://www.wheel.pl
pjd@FreeBSD.org                           http://www.FreeBSD.org
FreeBSD committer                         Am I Evil? Yes, I Am!

--RnlQjJ0d97Da+TV1
Content-Type: application/pgp-signature
Content-Disposition: inline

-----BEGIN PGP SIGNATURE-----
Version: GnuPG v1.4.2 (FreeBSD)

iD8DBQFDex8EForvXbEpPzQRAkpkAJ9fTLhkNRilq0AwTb+8r0PdCR0YNACg6Hrz
JSrPVHFCgqO7eHlE+Sw6E2Y=
=w1jj
-----END PGP SIGNATURE-----

--RnlQjJ0d97Da+TV1--



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