From nobody Sat Feb 21 09:49:48 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 4fJ2Qj2lK2z6SKPL for ; Sat, 21 Feb 2026 09:49:49 +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 "R12" (not verified)) by mx1.freebsd.org (Postfix) with ESMTPS id 4fJ2Qh5GLWz41b2 for ; Sat, 21 Feb 2026 09:49:48 +0000 (UTC) (envelope-from git@FreeBSD.org) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=freebsd.org; s=dkim; t=1771667388; 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=Edt59M2xN5OpcCVZzbmOVsz2GVtHR1L21yk7Mnw+AQk=; b=OXTsf3jOef6hN5Z+NFQW1uo5NKgNfQOte6PeHQEAXY8O7qVtQuGNzO6PIuzKCGP0KC/AC3 tzcDQ+khCPjtB6RFyNdOK+NItWEBZPVlfOMjzn6VOX8uc82uckus+B0rIn+qoKBcRtJ+L3 jP57o2mR7i5NALC5/X1aCxwhjhO5gHQmMm0layM4QZ3S4uOWiUkGsEAC0tDSgo77ThrI1N F2eougI+V6sqGE3m84C12eSrAGdo3ZhtBP+xWFHD32dhaNkmPXBMtYImLfB0DAK8xhOHmR cintMETJ/0+9jb1rIB4BSH2igLDnnw5+NQu1Qf/49NKhGQReUeWyWvU1Er9yUw== ARC-Seal: i=1; s=dkim; d=freebsd.org; t=1771667388; a=rsa-sha256; cv=none; b=l0DN3oZhjHdMG0Fs6+dXZC/rCxpqX8keX0mfctQFhlA8TbkNVBiBCXkHJaTWdIlEavB/TU lIdMy2+i7b47lxtToTlIo2AF8d5gjlmaGFDb9GgDrpvy8OaU5VSq5NLWXg6ZYDVug6kS+p tlujcYhat7TVoOOQE0bUcv5E9qw6jHOiISo/AfaSOfBAjR4jMXJTEQb2WARDWBjLLDglgr L0nwoTivzoAi8Z8XhFzPHbVpeQAyxLfQ8Bv6LShE6bqKhV8BQyoCWpmnZKyPpjsagWPzmv vbGEmldX8oAIN/Mqnp7mvhXl1uZBwOcEv0wB6rhSocYjE/oWY2RiuBO5iPqPEA== 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=1771667388; 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=Edt59M2xN5OpcCVZzbmOVsz2GVtHR1L21yk7Mnw+AQk=; b=iG0lept5WmT4oRk3obRklV2cKSoex/ckq9IfbEfsGLI+y1GSPtBzOR+UQnmKSEEB3EUiUZ cRhlpXc+9LM38tI3dLDy8+sWqCxyO1T7mHtfyG7VYnjmV58fX0PhF/AwgH/iGESTQw+d8B zsPdqV/+rPsIu2vI08/Yp+eawdgO90QRb8zCe3XQe3cSV4+ft7h8M9PMseZUKI4wwDF8sc wtQuhMMDOa51elTp5GkS3bd8qGP90oH9E9ElrHHd2hitsi5/271Z8JSPZ4gjO6TXj9R6Hw oUHGTsHrqAQFZFFz27MGuJmGJO7UU7O2MndQolWloC3+HdBFtiwMUD+AHoEx3Q== Received: from gitrepo.freebsd.org (gitrepo.freebsd.org [IPv6:2610:1c1:1:6068::e6a:5]) by mxrelay.nyi.freebsd.org (Postfix) with ESMTP id 4fJ2Qh4Dymz170h for ; Sat, 21 Feb 2026 09:49:48 +0000 (UTC) (envelope-from git@FreeBSD.org) Received: from git (uid 1279) (envelope-from git@FreeBSD.org) id 20603 by gitrepo.freebsd.org (DragonFly Mail Agent v0.13+ on gitrepo.freebsd.org); Sat, 21 Feb 2026 09:49:48 +0000 To: src-committers@FreeBSD.org, dev-commits-src-all@FreeBSD.org, dev-commits-src-branches@FreeBSD.org From: Konstantin Belousov Subject: git: afe686823aa6 - stable/15 - pdfork.2: add EFAULT as possible error, explain some consequences of it 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 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: afe686823aa6311ac9a74f35c6a1100511b521d8 Auto-Submitted: auto-generated Date: Sat, 21 Feb 2026 09:49:48 +0000 Message-Id: <69997fbc.20603.c0aa6f4@gitrepo.freebsd.org> The branch stable/15 has been updated by kib: URL: https://cgit.FreeBSD.org/src/commit/?id=afe686823aa6311ac9a74f35c6a1100511b521d8 commit afe686823aa6311ac9a74f35c6a1100511b521d8 Author: Konstantin Belousov AuthorDate: 2026-02-16 10:18:07 +0000 Commit: Konstantin Belousov CommitDate: 2026-02-21 09:48:58 +0000 pdfork.2: add EFAULT as possible error, explain some consequences of it (cherry picked from commit db80ea9b88628168d2bb7f17a60b73568a8ea102) --- 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