Date: Mon, 16 Feb 2026 17:58:12 +0000 From: Konstantin Belousov <kib@FreeBSD.org> To: src-committers@FreeBSD.org, dev-commits-src-all@FreeBSD.org, dev-commits-src-main@FreeBSD.org Subject: git: db80ea9b8862 - main - pdfork.2: add EFAULT as possible error, explain some consequences of it Message-ID: <69935ab4.34136.5f99571e@gitrepo.freebsd.org>
index | next in thread | raw e-mail
The branch main has been updated by kib: URL: https://cgit.FreeBSD.org/src/commit/?id=db80ea9b88628168d2bb7f17a60b73568a8ea102 commit db80ea9b88628168d2bb7f17a60b73568a8ea102 Author: Konstantin Belousov <kib@FreeBSD.org> AuthorDate: 2026-02-16 10:18:07 +0000 Commit: Konstantin Belousov <kib@FreeBSD.org> 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 pdkillhome | help
Want to link to this message? Use this
URL: <https://mail-archive.FreeBSD.org/cgi/mid.cgi?69935ab4.34136.5f99571e>
