From owner-cvs-src@FreeBSD.ORG Wed Nov 16 11:59:27 2005 Return-Path: X-Original-To: cvs-src@FreeBSD.ORG Delivered-To: cvs-src@FreeBSD.ORG Received: from mx1.FreeBSD.org (mx1.freebsd.org [216.136.204.125]) by hub.freebsd.org (Postfix) with ESMTP id D36BA16A41F; Wed, 16 Nov 2005 11:59:27 +0000 (GMT) (envelope-from pjd@garage.freebsd.pl) Received: from mail.garage.freebsd.pl (arm132.internetdsl.tpnet.pl [83.17.198.132]) by mx1.FreeBSD.org (Postfix) with ESMTP id 3597443D45; Wed, 16 Nov 2005 11:59:26 +0000 (GMT) (envelope-from pjd@garage.freebsd.pl) Received: by mail.garage.freebsd.pl (Postfix, from userid 65534) id ACC5F50F93; Wed, 16 Nov 2005 12:59:24 +0100 (CET) Received: from localhost (pjd.wheel.pl [10.0.1.1]) (using TLSv1 with cipher DHE-RSA-AES256-SHA (256/256 bits)) (No client certificate requested) by mail.garage.freebsd.pl (Postfix) with ESMTP id 3FC8650B83; Wed, 16 Nov 2005 12:59:17 +0100 (CET) Date: Wed, 16 Nov 2005 12:59:00 +0100 From: Pawel Jakub Dawidek To: Andrey Chernov , src-committers@FreeBSD.ORG, cvs-src@FreeBSD.ORG, cvs-all@FreeBSD.ORG Message-ID: <20051116115900.GA7992@garage.freebsd.pl> References: <200511161103.jAGB30d4062758@repoman.freebsd.org> <20051116112419.GA1363@nagual.pp.ru> Mime-Version: 1.0 Content-Type: multipart/signed; micalg=pgp-sha1; protocol="application/pgp-signature"; boundary="RnlQjJ0d97Da+TV1" Content-Disposition: inline In-Reply-To: <20051116112419.GA1363@nagual.pp.ru> X-PGP-Key-URL: http://people.freebsd.org/~pjd/pjd.asc X-OS: FreeBSD 7.0-CURRENT i386 User-Agent: mutt-ng/devel-r535 (FreeBSD) X-Spam-Checker-Version: SpamAssassin 3.0.4 (2005-06-05) on mail.garage.freebsd.pl X-Spam-Level: X-Spam-Status: No, score=-5.9 required=3.0 tests=ALL_TRUSTED,BAYES_00 autolearn=ham version=3.0.4 Cc: Subject: Re: cvs commit: src/usr.bin/pkill pkill.c X-BeenThere: cvs-src@freebsd.org X-Mailman-Version: 2.1.5 Precedence: list List-Id: CVS commit messages for the src tree List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Wed, 16 Nov 2005 11:59:28 -0000 --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--