git: e267cce5a5 - main - Report aboud pdwait(2) and pdrfork(2)

Konstantin Belousov <[email protected]>
Newsgroups gmane.os.freebsd.devel.cvs.doc
Message-ID <[email protected]>
The branch main has been updated by kib:

URL: https://cgit.FreeBSD.org/doc/commit/?id=e267cce5a5b5c2f7f56c558e9ac1e757aa605521

commit e267cce5a5b5c2f7f56c558e9ac1e757aa605521
Author:     Konstantin Belousov <[email protected]>
AuthorDate: 2026-04-02 05:38:20 +0000
Commit:     Konstantin Belousov <[email protected]>
CommitDate: 2026-04-10 15:13:11 +0000

    Report aboud pdwait(2) and pdrfork(2)
    
    Reviewed by:    salvadore
    Sponsored by:   The FreeBSD Foundation
    Differential revision:  https://reviews.freebsd.org/D56221
---
 .../en/status/report-2026-01-2026-03/pdwait.adoc      | 19 +++++++++++++++++++
 1 file changed, 19 insertions(+)

diff --git a/website/content/en/status/report-2026-01-2026-03/pdwait.adoc b/website/content/en/status/report-2026-01-2026-03/pdwait.adoc
new file mode 100644
index 0000000000..c4bd211ac3
--- /dev/null
+++ b/website/content/en/status/report-2026-01-2026-03/pdwait.adoc
@@ -0,0 +1,19 @@
+=== Process Descriptor API completion
+
+Contact: Konstantin Belousov <[email protected]>
+
+FreeBSD offered the Process Descriptors facility for long time.
+Its main use is in the Capsicum sandboxes where the handle is required to operate on an object, and process descriptor provided such handle.
+Other operating systems provide similar facility under the same name.
+The offered API was not complete, main lacking part being the man:pdwait[2] system call, the analog of man:wait[2] family, which operates on the process descriptor instead of the process id.
+
+The described project added man:pdwait[2] call.
+Another important addition was the man:pdrfork[2] call, which provides the same fine-grained support for process copy construction as man:rfork[2], but also returns the process descriptor as the handle, like man:pdfork[2].
+
+After pdwait and pdrfork addition, the natural extensions for the man:posix_spawn[3] facilities were possible.
+Now the man:posix_spawnattr_setprocdescp_np[3] attribute requests that man:posix_spawn[3] returned process descriptor.
+Another natural addition was man:posix_spawnattr_setexecfd_np[3] which specifies the executable image by file descriptor instead of the name.
+
+Together, the newly added features make the process descriptor complete and allow the use of posix_spawn in the sandboxes.
+
+Sponsor: The FreeBSD Foundation
lmpx.com only provides a reader for public news (NNTP) servers. It is not affiliated with the servers or forums shown here and is not responsible for the content of articles, which is written by their respective authors.