pcntl_forkx
(PHP 8 >= 8.2.0)
pcntl_forkx — Create a child process using forkx(2)
说明
The pcntl_forkx() function creates a child process
using the forkx(2) system call, which is available
on illumos and Solaris systems.
参数
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.
返回值
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.
参见
- pcntl_fork() - 在当前进程当前位置产生分叉(fork)
- pcntl_rfork() - Manipulates process resources
- pcntl_waitpid() - 等待或返回 fork 的子进程状态
来源:PHP Documentation Group · 作者与贡献记录 · CC BY 3.0。离线整理了版式、链接和媒体显示。
