From owner-cvs-all@FreeBSD.ORG Thu Nov 23 11:55:24 2006 Return-Path: X-Original-To: cvs-all@FreeBSD.org Delivered-To: cvs-all@FreeBSD.org Received: from mx1.FreeBSD.org (mx1.freebsd.org [69.147.83.52]) by hub.freebsd.org (Postfix) with ESMTP id 6E14016A412; Thu, 23 Nov 2006 11:55:24 +0000 (UTC) (envelope-from yar@FreeBSD.org) Received: from repoman.freebsd.org (repoman.freebsd.org [69.147.83.41]) by mx1.FreeBSD.org (Postfix) with ESMTP id 29C6743D4C; Thu, 23 Nov 2006 11:54:43 +0000 (GMT) (envelope-from yar@FreeBSD.org) Received: from repoman.freebsd.org (localhost [127.0.0.1]) by repoman.freebsd.org (8.13.6/8.13.6) with ESMTP id kANBtHZi074240; Thu, 23 Nov 2006 11:55:17 GMT (envelope-from yar@repoman.freebsd.org) Received: (from yar@localhost) by repoman.freebsd.org (8.13.6/8.13.4/Submit) id kANBtH2P074239; Thu, 23 Nov 2006 11:55:17 GMT (envelope-from yar) Message-Id: <200611231155.kANBtH2P074239@repoman.freebsd.org> From: Yar Tikhiy Date: Thu, 23 Nov 2006 11:55:17 +0000 (UTC) To: src-committers@FreeBSD.org, cvs-src@FreeBSD.org, cvs-all@FreeBSD.org X-FreeBSD-CVS-Branch: HEAD Cc: Subject: cvs commit: src/usr.bin/pkill pkill.1 pkill.c src/tools/regression/usr.bin/pkill pgrep-j.t pkill-j.t X-BeenThere: cvs-all@freebsd.org X-Mailman-Version: 2.1.5 Precedence: list List-Id: CVS commit messages for the entire tree List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Thu, 23 Nov 2006 11:55:24 -0000 yar 2006-11-23 11:55:17 UTC FreeBSD src repository Modified files: usr.bin/pkill pkill.1 pkill.c tools/regression/usr.bin/pkill pgrep-j.t pkill-j.t Log: Fix and extend the -j option to pkill/pgrep WRT the jail wildcard specifications. Earlier the only wildcard syntax was "-j 0" for "any jail". There were at least two shortcomings in it: First, jail ID 0 was abused; it meant "no jail" in other utils, e.g., ps(1). Second, it was impossible to match processed not in jail, which could be useful to rc.d developers. Therefore a new syntax is introduced: "-j any" means any jail while "-j none" means out of jail. The old syntax is preserved for compatibility, but now it's deprecated because it's limited and confusing. Update the respective regression tests. While I'm here, make the tests more complex but sensitive: Start several processes, some in jail and some out of jail, so we can detect that only the right processes are killed by pkill or matched by pgrep. Reviewed by: gad, pjd MFC after: 1 week Revision Changes Path 1.2 +41 -11 src/tools/regression/usr.bin/pkill/pgrep-j.t 1.2 +46 -24 src/tools/regression/usr.bin/pkill/pkill-j.t 1.21 +19 -2 src/usr.bin/pkill/pkill.1 1.31 +25 -7 src/usr.bin/pkill/pkill.c