From nobody Tue Jun 24 14:49:38 2025 X-Original-To: dev-commits-src-main@mlmmj.nyi.freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2610:1c1:1:606c::19:1]) by mlmmj.nyi.freebsd.org (Postfix) with ESMTP id 4bRSXM18sfz5ysdP; Tue, 24 Jun 2025 14:49:39 +0000 (UTC) (envelope-from git@FreeBSD.org) Received: from mxrelay.nyi.freebsd.org (mxrelay.nyi.freebsd.org [IPv6:2610:1c1:1:606c::19:3]) (using TLSv1.3 with cipher TLS_AES_256_GCM_SHA384 (256/256 bits) key-exchange X25519 server-signature RSA-PSS (4096 bits) server-digest SHA256 client-signature RSA-PSS (4096 bits) client-digest SHA256) (Client CN "mxrelay.nyi.freebsd.org", Issuer "R10" (verified OK)) by mx1.freebsd.org (Postfix) with ESMTPS id 4bRSXL5YWhz3MYC; Tue, 24 Jun 2025 14:49:38 +0000 (UTC) (envelope-from git@FreeBSD.org) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=freebsd.org; s=dkim; t=1750776578; h=from:from:reply-to:subject:subject:date:date:message-id:message-id: to:to:cc:mime-version:mime-version:content-type:content-type: content-transfer-encoding:content-transfer-encoding; bh=MXNN01by3cqRsuYX9TxTx8NpI/TkZIlITSrB+z5S52A=; b=qruMo3zxVa4vnPmu8CVkFspxSd42dOnxeNW6u29AhFglaXNtGb2Nk56mi+8COEpieUK9XT o2rmaTZLeUoDN/mi+Da1rRYeGMJ5AbtiW+n95OcjOgR1NZ3uptSmOGRQuSOlpih9E/50sH 4HyGyAbCHekkCWnnKJWugvEYNWu+/5pMPhF/jirnMdFBW90kElE5L4v+U3yVUiaZ/DqURK FPQG1xdbTZ60b72p+1ReekSPERguXNU/L/m+DUDzswavKD12DmibStqUFD4beR1Xj5lM8W 6cCFY6l8NOdymHURpf79sX8QBAm+SOgDuBCFiVSmrrRyE7XRfvenpvWaSSJQvA== ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=freebsd.org; s=dkim; t=1750776578; h=from:from:reply-to:subject:subject:date:date:message-id:message-id: to:to:cc:mime-version:mime-version:content-type:content-type: content-transfer-encoding:content-transfer-encoding; bh=MXNN01by3cqRsuYX9TxTx8NpI/TkZIlITSrB+z5S52A=; b=ZEzLS0vWTmIU8HZ77ycIsH5+PEvsfRgKf97v8/2He6IckNH7wzgoqWx3Wwrr0FzA4npjtN 8ARJKFBGGutWpQGFLHgNX7zpyAqZqLgZ3hNnMWlCBHrxxWf+S6mNjAiTcRrMCaCifXm5lX slXBDtdZdzWpH65wzqdZr0x8dp95lb5XAfJsmqz5FVB2OYdfan6PcS5OmhAr6bmVYt1WkB PSsZRJkqSHC0iXKFbIeA8SqKoRPE6DbUWfnW67brpoRzId4ssoGEZ6ePvt7Q2VSd+mzyYo SQYsxj9lYsg0StrPUQLQlWBxtn96YvUY+gXyj3SUyuVFP3/29YRYYhz+KRbcnA== ARC-Authentication-Results: i=1; mx1.freebsd.org; none ARC-Seal: i=1; s=dkim; d=freebsd.org; t=1750776578; a=rsa-sha256; cv=none; b=Vi3v6feq/3qFc/f4KIKUskEKGSC1OwtEJG83JXicWRocwTtFliq+4Ulyzzlefv8DcqnBRf AuSgdg4nEGEi3v5tPD8wqGg3FrC0d2bdqlSQQRj331Wmh/67LOAM0hMfTRkw7BcW6vhc75 JtRV68xaGTAsiED7/lDfbY8GJlluJ3+aHBsg/GtXTHRC8Zhw5XOlWia7RS9EDU5sQSmCXD C/k9w9pjjvrA/hKhalW/EJEFNXCtPt9oH2Q4cF/WrQZxw9a1OFNMvp/mq+OnToNv0ftfUZ VEtPeQYh6qFgfNsby1/I+0jmYYponR7LgGjc2hRjhnjdpirNZL4P3dd5iJ5XUw== Received: from gitrepo.freebsd.org (gitrepo.freebsd.org [IPv6:2610:1c1:1:6068::e6a:5]) (using TLSv1.3 with cipher TLS_AES_256_GCM_SHA384 (256/256 bits) key-exchange X25519 server-signature RSA-PSS (4096 bits) server-digest SHA256) (Client did not present a certificate) by mxrelay.nyi.freebsd.org (Postfix) with ESMTPS id 4bRSXL58ffzsf8; Tue, 24 Jun 2025 14:49:38 +0000 (UTC) (envelope-from git@FreeBSD.org) Received: from gitrepo.freebsd.org ([127.0.1.44]) by gitrepo.freebsd.org (8.18.1/8.18.1) with ESMTP id 55OEncTM073016; Tue, 24 Jun 2025 14:49:38 GMT (envelope-from git@gitrepo.freebsd.org) Received: (from git@localhost) by gitrepo.freebsd.org (8.18.1/8.18.1/Submit) id 55OEncL3073013; Tue, 24 Jun 2025 14:49:38 GMT (envelope-from git) Date: Tue, 24 Jun 2025 14:49:38 GMT Message-Id: <202506241449.55OEncL3073013@gitrepo.freebsd.org> To: src-committers@FreeBSD.org, dev-commits-src-all@FreeBSD.org, dev-commits-src-main@FreeBSD.org From: Kyle Evans Subject: git: 88a2d48d39d9 - main - pkill: better document ancestor-hiding List-Id: Commit messages for the main branch of the src repository List-Archive: https://lists.freebsd.org/archives/dev-commits-src-main List-Help: List-Post: List-Subscribe: List-Unsubscribe: X-BeenThere: dev-commits-src-main@freebsd.org Sender: owner-dev-commits-src-main@FreeBSD.org MIME-Version: 1.0 Content-Type: text/plain; charset=utf-8 Content-Transfer-Encoding: 8bit X-Git-Committer: kevans X-Git-Repository: src X-Git-Refname: refs/heads/main X-Git-Reftype: branch X-Git-Commit: 88a2d48d39d9845e36c8e95a9204001b11e7257e Auto-Submitted: auto-generated The branch main has been updated by kevans: URL: https://cgit.FreeBSD.org/src/commit/?id=88a2d48d39d9845e36c8e95a9204001b11e7257e commit 88a2d48d39d9845e36c8e95a9204001b11e7257e Author: Kyle Evans AuthorDate: 2025-06-24 14:49:31 +0000 Commit: Kyle Evans CommitDate: 2025-06-24 14:49:31 +0000 pkill: better document ancestor-hiding More prominently note that we'll hide ancestors in the first two paragraphs that provide an overview of pkill/pgrep. It also seems worth noting in the description of -a that we won't ever unhide the pgrep/pkill command itself, as mypid is skipped in all process iteration by way of PSKIP(). Reviewed by: allanjude, des Sponsored by: Klara, Inc. Differential Revision: https://reviews.freebsd.org/D51009 --- bin/pkill/pkill.1 | 21 ++++++++++++++++++--- 1 file changed, 18 insertions(+), 3 deletions(-) diff --git a/bin/pkill/pkill.1 b/bin/pkill/pkill.1 index f06b448b5df8..40abbba96362 100644 --- a/bin/pkill/pkill.1 +++ b/bin/pkill/pkill.1 @@ -27,7 +27,7 @@ .\" ARISING IN ANY WAY OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE .\" POSSIBILITY OF SUCH DAMAGE. .\" -.Dd October 5, 2020 +.Dd June 24, 2025 .Dt PKILL 1 .Os .Sh NAME @@ -71,12 +71,17 @@ The .Nm pgrep command searches the process table on the running system and prints the process IDs of all processes that match the criteria given on the command -line. +line, excluding itself and all direct ancestors unless the +.Fl a +option is specified. .Pp The .Nm pkill command searches the process table on the running system and signals all -processes that match the criteria given on the command line. +processes that match the criteria given on the command line, excluding itself +and all direct ancestors unless the +.Fl a +option is specified. .Pp The following options are available: .Bl -tag -width ".Fl F Ar pidfile" @@ -130,6 +135,16 @@ or process and all of its ancestors are excluded (unless .Fl v is used). +Note that the +.Fl a +option will not +.Dq unhide +the +.Nm pgrep +or +.Nm pkill +process itself, even with +.Fl v . .It Fl c Ar class Restrict matches to processes running with specified login class .Ar class .