GSP
Quick Navigator

Search Site

Unix VPS
A - Starter
B - Basic
C - Preferred
D - Commercial
MPS - Dedicated
* Sign Up! *

Support
Customer Portal
Contact Us
Online Help
Handbooks
Domain Status
Man Pages

FAQ
Virtual Servers
Pricing
Billing
Technical

Network
Facilities
Connectivity
Topology Map

Miscellaneous
Server Agreement
Year 2038
Credits
 

USA Flag

 

 

Man Pages
POSIX_SPAWNATTR_GETPROCDESCP_NP(3) FreeBSD Library Functions Manual POSIX_SPAWNATTR_GETPROCDESCP_NP(3)

posix_spawnattr_getprocdesp_np, posix_spawnattr_setprocdescp_npget and set the spawn-procdescp attribute of a spawn attributes object

Standard C Library (libc, -lc)

#include <spawn.h>

int
posix_spawnattr_getprocdescp_np(const posix_spawnattr_t *restrict attr, int **restrict fdpp, int *restrict pdrflagsp);

int
posix_spawnattr_setprocdescp_np(posix_spawnattr_t *attr, int *restrict fdp, int pdrflags);

The () function obtains the value of the spawn-procdescp attribute from the attributes object referenced by attr.

The () function sets the spawn-procdescp attribute in an initialized attributes object referenced by attr.

The spawn-procdescp attribute provides the location where the child process's file descriptor will be stored after a successful spawn. Setting the attribute to a non-NULL value implicitly request the creation of the file descriptor that references the child process. It wiil be created by the pdrfork(2) system call. which will be used instead of fork/vfork/rfork(2) when the attribute is set to NULL.

If the attribute is set to a value other then NULL, it must be a valid pointer to a variable of int type, where the resulting descriptor will be stored. The pdrflags argument specifies additional flags that are accepted by the pdfork(2) system call. See its description for the list of the valid flags. Note that the PD_CLOEXEC flag is always set, preventing leakage of the process descriptor into the newly created child.

The default value for the spawn-procdescp attribute is NULL, which means that no process descriptor will be created.

The posix_spawnattr_getprocdescp_np() and posix_spawnattr_setprocdescp_np() functions return zero.

The posix_spawnattr_getprocdescp_np() and posix_spawnattr_setprocdescp_np() are FreeBSD extensions that first appeared in FreeBSD 16.0.

January 26, 2026 FreeBSD 15.1-RELEASE-p1

Search for    or go to Top of page |  Section 3 |  Main Index

Powered by GSP Visit the GSP FreeBSD Man Page Interface.
Output converted with ManDoc.