From nobody Mon Feb 16 17:58:12 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 4fF9VX4R45z6S6vq for ; Mon, 16 Feb 2026 17:58:12 +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 "R13" (verified OK)) by mx1.freebsd.org (Postfix) with ESMTPS id 4fF9VX1skwz3YQW for ; Mon, 16 Feb 2026 17:58:12 +0000 (UTC) (envelope-from git@FreeBSD.org) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=freebsd.org; s=dkim; t=1771264692; 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=kRDMpkEjCOcAruW51zKSee8QOO0PBotI/4CDFymMiLU=; b=dAnYub3IBkX/VM8A2IEvxnrxruFtgL3ZxDiKXKFnQmRHowtb9QkinEv9l0BmSBzvyb41Bv rXxdhs+H1Qz1P6rN/EaFIgZB+yVKEI85r5mY1HXslJ/f3HBRn/9ugD/PEFIWM9Rt/K64Vx Pf3BA1rLWDvxQJnzSynnV9dblQLA1OiG7V0/F+yxMMTN7EQzlhS68Rj9baAzplVZctEyKg k0RiqHHy42xydj16QhxvGYqWF5BkZVzE5OxrEiO0nhmtBr6E9Vw3kqmUZmABoHBBv2818W qMJxMtRWqrozSQsHuctxaAbIgJDDRkxciXt5MnQjhM09zyoIcJqNGkBEvIDh7g== ARC-Seal: i=1; s=dkim; d=freebsd.org; t=1771264692; a=rsa-sha256; cv=none; b=CaVQyl6s0oXV8Gl9p0Zozg5tmLBNRnOAaiSeWs17VAWI/DeT3siUBxgHRDIAFkyCuBL5+5 uWr44X/oVDu/2Byz3b+JjDchHMKDCo5yqM6XN+gcwB79Mk3xlCquelwyNZE9XTRks48Zkf TksK36USljPujUlY1Jo+Qp4kYbCmCkBPoglGByP4TMkBlZqHrjwUWho/xC6Wz6GZHHx9zg qjmgUry6WoqgkttUN0H6WaMpZwDMxobF8hz+caCvEuV2KZm0O8b6Zba8D6HJDhbW1eUeyB F8gRDk+wn7d29vw/v6y/w7XCZ07l2F0s5cTi4x7fgEq9c5pm7BpPf2LsGNqN2w== 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=1771264692; 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=kRDMpkEjCOcAruW51zKSee8QOO0PBotI/4CDFymMiLU=; b=v3lBjbLzb6qcpNiAheq1eaZQ9C7DwGt1tjzYdcWjtg3tV+gGKot+5dkdsB3WSD1LoaqHBL fGkvC7/Naa08w5t0fGVsOlDNxBKlKUEzwoqWJzqIdMH+kPcZAF/uMTL3jxTzd3tEkO+i1A 30prChiiVh5QyuHhTIJ7X3PSFXXk22JwhRTUHMkzh1+Ycv7kCWtH7nE+8X78VS0Vv8EPLY yK+hFeU59TaBqf/8baNcyJkNSJyHmUTINMD4Q3m4q8A3CmnqAkE2tNblrVWqFdrlfkO3zh LBGEftZn7mDR/azY0BG6hgoOJ8QExU3BpPP1UAp9Qqfc+8r9hM76NNjBSe7pmA== Received: from gitrepo.freebsd.org (gitrepo.freebsd.org [IPv6:2610:1c1:1:6068::e6a:5]) by mxrelay.nyi.freebsd.org (Postfix) with ESMTP id 4fF9VX1KGNzb7w for ; Mon, 16 Feb 2026 17:58:12 +0000 (UTC) (envelope-from git@FreeBSD.org) Received: from git (uid 1279) (envelope-from git@FreeBSD.org) id 34136 by gitrepo.freebsd.org (DragonFly Mail Agent v0.13+ on gitrepo.freebsd.org); Mon, 16 Feb 2026 17:58:12 +0000 To: src-committers@FreeBSD.org, dev-commits-src-all@FreeBSD.org, dev-commits-src-main@FreeBSD.org From: Konstantin Belousov Subject: git: db80ea9b8862 - main - pdfork.2: add EFAULT as possible error, explain some consequences of it 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: kib X-Git-Repository: src X-Git-Refname: refs/heads/main X-Git-Reftype: branch X-Git-Commit: db80ea9b88628168d2bb7f17a60b73568a8ea102 Auto-Submitted: auto-generated Date: Mon, 16 Feb 2026 17:58:12 +0000 Message-Id: <69935ab4.34136.5f99571e@gitrepo.freebsd.org> The branch main has been updated by kib: URL: https://cgit.FreeBSD.org/src/commit/?id=db80ea9b88628168d2bb7f17a60b73568a8ea102 commit db80ea9b88628168d2bb7f17a60b73568a8ea102 Author: Konstantin Belousov AuthorDate: 2026-02-16 10:18:07 +0000 Commit: Konstantin Belousov CommitDate: 2026-02-16 17:57:52 +0000 pdfork.2: add EFAULT as possible error, explain some consequences of it Reviewed by: markj Sponsored by: The FreeBSD Foundation MFC after: 1 week Differential revision: https://reviews.freebsd.org/D55306 --- lib/libsys/pdfork.2 | 18 ++++++++++++++++++ 1 file changed, 18 insertions(+) diff --git a/lib/libsys/pdfork.2 b/lib/libsys/pdfork.2 index 9cbeb65bc4fc..49226cf069de 100644 --- a/lib/libsys/pdfork.2 +++ b/lib/libsys/pdfork.2 @@ -205,6 +205,24 @@ may return the same error numbers as .Xr fork 2 ) , with the following additions: .Bl -tag -width Er +.It Bq Er EFAULT +The copyout of the resulting file descriptor value to the memory pointed +to by +.Fa fdp +failed. +.Pp +Note that the child process was already created when this condition +is detected, +and the child continues execution, same as the parent. +If this error must be handled, it is advisable to memoize the +.Fn getpid +result before the call to +.Fn pdfork +or +.Fn pdrfork , +and compare it to the value returned by +.Fn getpid +after, to see if code is executing in parent or child. .It Bq Er EINVAL The signal number given to .Fn pdkill