diff --git a/reference/pcntl/functions/pcntl-forkx.xml b/reference/pcntl/functions/pcntl-forkx.xml new file mode 100644 index 000000000000..e867f3dec45b --- /dev/null +++ b/reference/pcntl/functions/pcntl-forkx.xml @@ -0,0 +1,83 @@ + + + + pcntl_forkx + Create a child process using forkx(2) + + + + &reftitle.description; + + intpcntl_forkx + intflags + + + The pcntl_forkx function creates a child process + using the forkx(2) system call, which is available + on illumos and Solaris systems. + + + + + &reftitle.parameters; + + + + flags + + + The flags parameter controls the behavior + of the fork. Pass 0 for default behavior or + FORK_NOSIGCHLD to prevent the + SIGCHLD signal from being sent to the parent + when the child terminates. + + + + + + + + + &reftitle.returnvalues; + + On success, the PID of the child process is returned in the + parent's thread of execution, and a 0 is returned + in the child's thread of execution. On failure, a -1 + will be returned in the parent's context, no child process will be + created, and a PHP error is raised. + + + + + &reftitle.seealso; + + + pcntl_fork + pcntl_rfork + pcntl_waitpid + + + + + + diff --git a/reference/pcntl/functions/pcntl-getcpu.xml b/reference/pcntl/functions/pcntl-getcpu.xml new file mode 100644 index 000000000000..5516b7b5b4af --- /dev/null +++ b/reference/pcntl/functions/pcntl-getcpu.xml @@ -0,0 +1,63 @@ + + + + pcntl_getcpu + Get the CPU number on which the calling process last executed + + + + &reftitle.description; + + intpcntl_getcpu + + + + pcntl_getcpu returns the number of the CPU on which + the calling process was last executed. This function uses the + sched_getcpu(3) system call available on Linux. + + + + + &reftitle.parameters; + &no.function.parameters; + + + + &reftitle.returnvalues; + + Returns the CPU number as an &integer;. + + + + + &reftitle.seealso; + + + pcntl_getcpuaffinity + pcntl_setcpuaffinity + + + + + + diff --git a/reference/pcntl/functions/pcntl-getqos-class.xml b/reference/pcntl/functions/pcntl-getqos-class.xml new file mode 100644 index 000000000000..afaeb8945292 --- /dev/null +++ b/reference/pcntl/functions/pcntl-getqos-class.xml @@ -0,0 +1,63 @@ + + + + pcntl_getqos_class + Get the current Quality of Service class of the process + + + + &reftitle.description; + + Pcntl\QosClasspcntl_getqos_class + + + + Returns the current Quality of Service (QoS) class of the calling process. + This function is only available on macOS, which uses QoS classes to + manage energy efficiency and performance. + + + + + &reftitle.parameters; + &no.function.parameters; + + + + &reftitle.returnvalues; + + Returns a Pcntl\QosClass enum value representing + the current QoS class. + + + + + &reftitle.seealso; + + + pcntl_setqos_class + + + + + + diff --git a/reference/pcntl/functions/pcntl-setns.xml b/reference/pcntl/functions/pcntl-setns.xml new file mode 100644 index 000000000000..702a5426c978 --- /dev/null +++ b/reference/pcntl/functions/pcntl-setns.xml @@ -0,0 +1,87 @@ + + + + pcntl_setns + Reassociate the calling process with a namespace of another process + + + + &reftitle.description; + + boolpcntl_setns + intnullprocess_id&null; + intnstypeCLONE_NEWNET + + + Reassociates the calling process with a Linux namespace of the process + specified by process_id, using a pidfd obtained + via pidfd_open(2) and setns(2). + + + + + &reftitle.parameters; + + + + process_id + + + The process ID of the target process whose namespace to join. + If &null;, the calling process's own PID is used. + + + + + nstype + + + The namespace type to reassociate with. Defaults to + CLONE_NEWNET (network namespace). + Possible values include CLONE_NEWNET, + CLONE_NEWIPC, + CLONE_NEWUTS, and others. + + + + + + + + + &reftitle.returnvalues; + + &return.success; + + + + + &reftitle.seealso; + + + pcntl_unshare + + + + + + diff --git a/reference/pcntl/functions/pcntl-setqos-class.xml b/reference/pcntl/functions/pcntl-setqos-class.xml new file mode 100644 index 000000000000..5a0b660da32e --- /dev/null +++ b/reference/pcntl/functions/pcntl-setqos-class.xml @@ -0,0 +1,81 @@ + + + + pcntl_setqos_class + Set the Quality of Service class of the process + + + + &reftitle.description; + + voidpcntl_setqos_class + Pcntl\QosClassqos_classPcntl\QosClass::Default + + + Sets the Quality of Service (QoS) class of the calling process. + This function is only available on macOS, which uses QoS classes to + manage energy efficiency and performance. + + + + + &reftitle.parameters; + + + + qos_class + + + The QoS class to set. Must be one of the + Pcntl\QosClass enum values: + + Pcntl\QosClass::UserInteractive + Pcntl\QosClass::UserInitiated + Pcntl\QosClass::Default + Pcntl\QosClass::Utility + Pcntl\QosClass::Background + + + + + + + + + + &reftitle.returnvalues; + + &return.void; + + + + + &reftitle.seealso; + + + pcntl_getqos_class + + + + + + diff --git a/reference/pcntl/functions/pcntl-wifcontinued.xml b/reference/pcntl/functions/pcntl-wifcontinued.xml new file mode 100644 index 000000000000..08b0246b7bfe --- /dev/null +++ b/reference/pcntl/functions/pcntl-wifcontinued.xml @@ -0,0 +1,78 @@ + + + + pcntl_wifcontinued + Checks whether the child process has continued from a job control stop + + + + &reftitle.description; + + boolpcntl_wifcontinued + intstatus + + + Checks whether the child process which caused the return of + pcntl_waitpid has continued from a job control stop. + This function is only useful if the call to + pcntl_waitpid was done using the + WCONTINUED option. + + + + + &reftitle.parameters; + + + + status + + &pcntl.parameter.status; + + + + + + + + &reftitle.returnvalues; + + Returns &true; if the child process which caused the return of + pcntl_waitpid has continued from a job control stop, + &false; otherwise. + + + + + &reftitle.seealso; + + + pcntl_waitpid + pcntl_wifstopped + pcntl_wifexited + pcntl_wifsignaled + + + + + +