From nobody Sun Jul 19 20:40:48 2026 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 4h3FsX6ZkNz6lb3X for ; Sun, 19 Jul 2026 20:40:48 +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 "YR1" (not verified)) by mx1.freebsd.org (Postfix) with ESMTPS id 4h3FsX3fC6z3v75 for ; Sun, 19 Jul 2026 20:40:48 +0000 (UTC) (envelope-from git@FreeBSD.org) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=freebsd.org; s=dkim; t=1784493648; 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=5H8Xfq7bKDwu5NNGxHUcvGGhf+0xWGv/C4oYrNwxXaU=; b=OranR2EM0E9gTB1oFvD5XkyBSMj0euiV9SL07LMJX2DcBRExkMWGV4Psiobh03bzavmrRh 128jembsdbVI4AdVPHY7903cqPsU8S2gVOvIBWtRWzctVU9Sf1Fv0HFvmcDb4tcKS1+ggv LSPoRSf9Xsl81C3x4VJ4nkJVky1fPdRETbzoXdnTKYH7U2BfDOl6ymyXI8JLKPf1YzU7ZE DuAUWkQA5O16d5Fue8pHYpt/N+RVWhWWXtCWzooUQmqc2dbN3nebNkqG6UNkeWmKS76CY7 EQryyD2TlJ6FiChMhIr3ewClZztUo9URo3wJzEqVeqZ0yyBHXJwVPyvQGt2D1g== ARC-Seal: i=1; s=dkim; d=freebsd.org; t=1784493648; a=rsa-sha256; cv=none; b=W9aEsXXU3cPFoHFIh99xkdM+ncPdsVH1zKpux8H1kFFfINNKAp6+kUp+RgMX8pc/R5Hj0o 1bP9gtpWYCLHIq3FRNjEOhpl56Dxd5Lq4ji0ER2cT/nITX7RRrpXMN/PZeDf57WhEHcAzF YkpkOI40GgcApY+rVD0VxTp+xwlRr9OT+LSwK7uWkclHXsyRGEh3R9z8OaS+yINgjTf4IW txqCGp/ZxtKT9jde1B/V3LstLxxG0WUlbxxdGfRhzAT4xWWOddtmx4GyD2EVp9TAo+4sg2 936Y0kYmBcBqhcCi3wyoG1grkFiOnh/KSEblCvcffV/AGMWKy6LoN3NxPz0EsQ== 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=1784493648; 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=5H8Xfq7bKDwu5NNGxHUcvGGhf+0xWGv/C4oYrNwxXaU=; b=i3NmNbUwDRHMtMazSwteoMmkeW+AEh6rEUUxAGefCf+6MYNoMcwEURBQ9jxyxogwbHAAgB RiFYQhdiEtL3SmBkGoO8JBi/ZG2gY3bejAyW2MDN72Wr30NAXxocWyVrAFZBeRwQsMQZT1 Jx/xEg259Ph+QsQ6B0d3KnBY/zXkmuLnWx252/PUfWdjEY0uGs/k9q21qJh2OPNDvo1dVn 04Zx3ocgGL+N6dIJpV0/hD7inQ5kwP9N5BUPbqNFlDK1sjXSz6J9PLAOzCl4JdXDBJ5e4l vFJIGy3nTQwQueCCjCVy5sTbhN2WTdZmyfZBoCjiBj4ZoP5fLb2SsSc+5P2n3A== Received: from gitrepo.freebsd.org (gitrepo.freebsd.org [IPv6:2610:1c1:1:6068::e6a:5]) by mxrelay.nyi.freebsd.org (Postfix) with ESMTP id 4h3FsX2kX6zXP8 for ; Sun, 19 Jul 2026 20:40:48 +0000 (UTC) (envelope-from git@FreeBSD.org) Received: from git (uid 1279) (envelope-from git@FreeBSD.org) id 19973 by gitrepo.freebsd.org (DragonFly Mail Agent v0.13+ on gitrepo.freebsd.org); Sun, 19 Jul 2026 20:40:48 +0000 To: src-committers@FreeBSD.org, dev-commits-src-all@FreeBSD.org, dev-commits-src-main@FreeBSD.org From: Konstantin Belousov Subject: git: 3f88f6b89942 - main - kqueue.2: document EVFILT_PROCDESC support for NOTE_FORK 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 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/main X-Git-Reftype: branch X-Git-Commit: 3f88f6b89942a7f3aa6bb682b02b7307d060b52f Auto-Submitted: auto-generated Date: Sun, 19 Jul 2026 20:40:48 +0000 Message-Id: <6a5d3650.19973.57ce5cc0@gitrepo.freebsd.org> The branch main has been updated by kib: URL: https://cgit.FreeBSD.org/src/commit/?id=3f88f6b89942a7f3aa6bb682b02b7307d060b52f commit 3f88f6b89942a7f3aa6bb682b02b7307d060b52f Author: Konstantin Belousov AuthorDate: 2026-07-17 05:38:57 +0000 Commit: Konstantin Belousov CommitDate: 2026-07-19 20:39:29 +0000 kqueue.2: document EVFILT_PROCDESC support for NOTE_FORK Reviewed by: markj Sponsored by: The FreeBSD Foundation MFC after: 1 week Differential revision: https://reviews.freebsd.org/D58292 --- lib/libsys/kqueue.2 | 35 +++++++++++++++++++++++++++++++++++ 1 file changed, 35 insertions(+) diff --git a/lib/libsys/kqueue.2 b/lib/libsys/kqueue.2 index cc46edc0a248..d2c6ed102f29 100644 --- a/lib/libsys/kqueue.2 +++ b/lib/libsys/kqueue.2 @@ -592,6 +592,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