aboutsummaryrefslogtreecommitdiff
path: root/lib/libsys
diff options
context:
space:
mode:
authorKonstantin Belousov <kib@FreeBSD.org>2026-02-16 10:18:07 +0000
committerKonstantin Belousov <kib@FreeBSD.org>2026-02-16 17:57:52 +0000
commitdb80ea9b88628168d2bb7f17a60b73568a8ea102 (patch)
tree4887e1692035727cd5e185f95b4e393efea363eb /lib/libsys
parentb05be03ceea0a95f7783ddc890885f34bb4023d4 (diff)
Diffstat (limited to 'lib/libsys')
-rw-r--r--lib/libsys/pdfork.218
1 files changed, 18 insertions, 0 deletions
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