From nobody Sun Aug 16 02:47:05 2026 X-Original-To: dev-commits-src-branches@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 4hN0jj6Q7gz6pHCd for ; Sun, 16 Aug 2026 02:47:05 +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 "YR2" (not verified)) by mx1.freebsd.org (Postfix) with ESMTPS id 4hN0jj1762z3fdr for ; Sun, 16 Aug 2026 02:47:05 +0000 (UTC) (envelope-from git@FreeBSD.org) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=freebsd.org; s=dkim; t=1786848425; 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=7YzuA8cJf3NzXsGR0hN3sqkCegXgudWuY8e7ifAPIR0=; b=AR/1qzz+H8J6Y/7hidiDyoHFui9o/SJCYKImL3ReHjFHANxEhWwcv1AGAhY9PAUclzCxEb OOiqAxeRGJZC/INoT4FhfUOlHsW8Bs1L9LEkc1kRr3w1sjSPGogywCle4CGGPrU2CQCvKi mEplRstF3iVWRrIs8cWnTAm6hdVS2oekjzCnDLf2FD7jfm296wI026C5p1T76iJ+M7V0Iy WGWrs9/waF+la9cSh/SxpubgFSgGTPMed3lQxENr94UHN5Qnf2Tzo8a4NkirxOVwlb+rxj gJ+bnYZC6jpgwCTp/j2BjqqUwlZ3GsJiq0m4POH8myJl7tEMgKRiwyNBlHR30Q== ARC-Seal: i=1; s=dkim; d=freebsd.org; t=1786848425; a=rsa-sha256; cv=none; b=FsFX3qQmJ8VFnD5lFCpck8j4UfEZegzNWBfO9xYeEVLDmvP/6o9nX3tKmVsHxGKBStvJ8g 9QSg8DRfmh7wDaTIJPpzxl+1+zngtJFXzgNH0opDkTwYZFcX6YG5A2svk7RFLZik+5p/t2 m350/awR81dzGYF8rga+Pd0RA1hsQdc/CQJYFQChAcQ1cTEZ6fbOKj2dRgdMj8R1/Dcpp6 DXO7W7JB4ch1XBH/1Zf53s/Fu+E0dD1CMfGveHUEQ071AZcWZucXKtWLXybie8YJIv9eMW MV43YghWDc0jzeSKQTohH9IE4KVm7VUuidWz0X7HFDX0gl9XXQxBdKVNBbHxjw== ARC-Authentication-Results: i=1; mx1.freebsd.org; none ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=freebsd.org; s=dkim; t=1786848425; 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=7YzuA8cJf3NzXsGR0hN3sqkCegXgudWuY8e7ifAPIR0=; b=NpsBb3ApOifsfjaM1c17JDKlwoKNuDUTYtDfsuDo9IUWFu17wWWbG9EjyESPHe/sqTiLbp OZqqRpIBFi+rP1hZ1QH9PBbdyYjpaE7k5TCk57pHPtN3xGUQ3RzcyD3q4PGBqdy7CBvvmw kXXwGnLg8pi39r8WVQU4nOg2+fAaTcovccA5A7aSknRDUZbNTFE/gd1p9K1S09siaFXmV5 pPZ4v23xz2swJLsosLeWWa3yjCrnGTr6Z9QgmhKIbOaGDGbvZyCNSclXVEbkZk9H5VTMKg ziG/Rf7CN4Q8sdVzdsPbxjNS4K1OYNtaVGjX4Yir1MVbP9vzcqPeQCbtg9xZSA== Received: from gitrepo.freebsd.org (gitrepo.freebsd.org [IPv6:2610:1c1:1:6068::e6a:5]) by mxrelay.nyi.freebsd.org (Postfix) with ESMTP id 4hN0jj02B5z18HK for ; Sun, 16 Aug 2026 02:47:05 +0000 (UTC) (envelope-from git@FreeBSD.org) Received: from git (uid 1279) (envelope-from git@FreeBSD.org) id 436e4 by gitrepo.freebsd.org (DragonFly Mail Agent v0.13+ on gitrepo.freebsd.org); Sun, 16 Aug 2026 02:47:05 +0000 To: src-committers@FreeBSD.org, dev-commits-src-all@FreeBSD.org, dev-commits-src-branches@FreeBSD.org From: Konstantin Belousov Subject: git: 0e3a044e4c4b - stable/15 - kqueue.2: document EVFILT_PROCDESC support for NOTE_FORK List-Id: Commits to the stable branches of the FreeBSD src repository List-Archive: https://lists.freebsd.org/archives/dev-commits-src-branches List-Help: List-Post: List-Subscribe: List-Unsubscribe: X-BeenThere: dev-commits-src-branches@freebsd.org Sender: owner-dev-commits-src-branches@FreeBSD.org List-Id: List-Post: List-Help: List-Subscribe: List-Unsubscribe: List-Owner: Precedence: list MIME-Version: 1.0 Content-Type: text/plain; charset=utf-8 Content-Transfer-Encoding: 8bit X-Git-Committer: kib X-Git-Repository: src X-Git-Refname: refs/heads/stable/15 X-Git-Reftype: branch X-Git-Commit: 0e3a044e4c4b0af4f25db6695d9340a7a7e57c2d Auto-Submitted: auto-generated Date: Sun, 16 Aug 2026 02:47:05 +0000 Message-Id: <6a8124a9.436e4.381e5e2e@gitrepo.freebsd.org> The branch stable/15 has been updated by kib: URL: https://cgit.FreeBSD.org/src/commit/?id=0e3a044e4c4b0af4f25db6695d9340a7a7e57c2d commit 0e3a044e4c4b0af4f25db6695d9340a7a7e57c2d Author: Konstantin Belousov AuthorDate: 2026-07-17 05:38:57 +0000 Commit: Konstantin Belousov CommitDate: 2026-08-16 02:41:33 +0000 kqueue.2: document EVFILT_PROCDESC support for NOTE_FORK (cherry picked from commit 3f88f6b89942a7f3aa6bb682b02b7307d060b52f) --- lib/libsys/kqueue.2 | 35 +++++++++++++++++++++++++++++++++++ 1 file changed, 35 insertions(+) diff --git a/lib/libsys/kqueue.2 b/lib/libsys/kqueue.2 index 5e0b80280a81..1ac337e78b38 100644 --- a/lib/libsys/kqueue.2 +++ b/lib/libsys/kqueue.2 @@ -598,6 +598,41 @@ The events to monitor are: The process has exited. The exit status will be stored in .Va data . +.It Dv NOTE_FORK +The process has forked. +The process identifier +.Pq PID +of the most recently forked child is returned in the +.Va data +field. +.Pp +The identifier is advisory; +if several children were spawned before the event is returned, +only one of the PIDs is returned. +Other mechanisms provide reliable reporting of fork events. +For instance, debugging the process with a subscription for relevant +events would serialize forks. +See +.Xr ptrace 2 +and the description of the +.Dv PT_FOLLOW_FORK +request. +.Pp +Unlike the +.Dv EVFILT_PROC +filter, +the +.Dv NOTE_TRACK +pseudo-event is not supported. +.Pp +If both +.Dv NOTE_EXIT +and +.Dv NOTE_FORK +events are reported, then the +.Va data +field contains the exit status of the process, +and the last child's PID is not returned. .It Dv NOTE_PDSIGCHLD Activates on events that are reported through .Xr pdwait 2