From nobody Mon Jul 21 02:13:55 2025 X-Original-To: dev-commits-src-all@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 4blkTv5Rfgz61xWJ; Mon, 21 Jul 2025 02:13:55 +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 4blkTv4CQMz3NL5; Mon, 21 Jul 2025 02:13:55 +0000 (UTC) (envelope-from git@FreeBSD.org) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=freebsd.org; s=dkim; t=1753064035; 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=unFdSOt/AFMc/s1VtRhiXyik3jup6lIVmhMiK+1Mr+k=; b=XVDY/vqM/xhV+KHRCK/hGpL24Rl1qslHP/P6uQzvJYA7t/1ZFfHuOKaX/qe3JKxITMAAUz 7U4Aq6QHQJTvowsLnSlPD8Si3iuXFzQdsld1aiw/DsJwq8A0EJgZM/Ki+akyEG/H9iOD8Q +qtfH18R34yHnBINpoGtA2mAhi4CE8njWD8fkyelle2TR6MmJuY4LWAu9O0t9Ibf7cAwuo I/GsKwR1LR++fcZGQ0QOjeLbazrBHOmhSi4iCg4atH0+5oPzgdQ4BDeeVL2rktqfTC1I+e CxiUIAnApQhyAz6tnkArP6icBGMYORgIzPBVKlC+SJBn44UEY8D8zzPWd++uOg== ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=freebsd.org; s=dkim; t=1753064035; 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=unFdSOt/AFMc/s1VtRhiXyik3jup6lIVmhMiK+1Mr+k=; b=Q4NrUiqymJSiv5IFxjBnkLPnIkfn3ugQth89sKRzdetl2/2B2aRkG6Rq74vJ38JSq8nVug VSqLWhO/lSlzIMcZP9Tll5BnN/KtjzSIbRmSI2DQ6ioJa4oLyspaQuD0GNy6wU6CxI64X+ UVcLA1mLYjY4CIyWsxFKKYiCy3VA3ja40OdCIWHx0kY6nrlH4/AOJ3cqxibU5wdIx8mPgo P14LQ3XzEpmMCSbnoNlP8xJovzTospti9V5wW5WtU2WlLuyVpeYY/NxOgUkB8LzSevJJiT C8nrJ3s8Dl3oUMpKWQxBqa76R6AUB/GvghxJVwsEMM18vg8TiJxxZo9fouyhDw== ARC-Authentication-Results: i=1; mx1.freebsd.org; none ARC-Seal: i=1; s=dkim; d=freebsd.org; t=1753064035; a=rsa-sha256; cv=none; b=AInbdp7BnX+GeDZlGbfOCF7gdlXkbVTo7e75xNaWZbZKhddtg4Da7LMsyn6zR/4xfIuz8b NZTwOm9aaE5nHv1/01lBkV5bpPxngc+Qd0fxFD24Gkc42fLmLcK9tyN5lgRk5YY3CaS+uu Hlw4NSnAT3xaj89fAahVBb10DKOqUBMukg5bqi8J9NMSeooeorDV6SfU75XHmmtx0PbI41 D/lrMkAGBV8Of6TPbUB13xL9j/1sZIwb+IbFUglJ9iihk5uxRCG4LoabfBRKkCUPl1sP6D yTP5xHU+fSJCmwcMsva23IpJTG7GEoZolm9YHrXpgOA+Bc+lWhF/45kyaSg28w== 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 4blkTv3HnRzdyq; Mon, 21 Jul 2025 02:13:55 +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 56L2Dt9i013838; Mon, 21 Jul 2025 02:13:55 GMT (envelope-from git@gitrepo.freebsd.org) Received: (from git@localhost) by gitrepo.freebsd.org (8.18.1/8.18.1/Submit) id 56L2Dt0F013835; Mon, 21 Jul 2025 02:13:55 GMT (envelope-from git) Date: Mon, 21 Jul 2025 02:13:55 GMT Message-Id: <202507210213.56L2Dt0F013835@gitrepo.freebsd.org> To: src-committers@FreeBSD.org, dev-commits-src-all@FreeBSD.org, dev-commits-src-branches@FreeBSD.org From: Kyle Evans Subject: git: 4354f62149b2 - stable/14 - pkill: better document ancestor-hiding List-Id: Commit messages for all branches of the src repository List-Archive: https://lists.freebsd.org/archives/dev-commits-src-all List-Help: List-Post: List-Subscribe: List-Unsubscribe: X-BeenThere: dev-commits-src-all@freebsd.org Sender: owner-dev-commits-src-all@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/stable/14 X-Git-Reftype: branch X-Git-Commit: 4354f62149b23feb7de04f73c46abc13eb34d63b Auto-Submitted: auto-generated The branch stable/14 has been updated by kevans: URL: https://cgit.FreeBSD.org/src/commit/?id=4354f62149b23feb7de04f73c46abc13eb34d63b commit 4354f62149b23feb7de04f73c46abc13eb34d63b Author: Kyle Evans AuthorDate: 2025-06-24 14:49:31 +0000 Commit: Kyle Evans CommitDate: 2025-07-21 02:12:28 +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. (cherry picked from commit 88a2d48d39d9845e36c8e95a9204001b11e7257e) --- 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 .