pcntl_setns
(PHP 8 >= 8.4.0)
pcntl_setns — Reassociate the calling process with a namespace of another process
Description
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).
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.
See Also
- pcntl_unshare() - Dissociates parts of the process execution context
来源:PHP Documentation Group · 作者与贡献记录 · CC BY 3.0。离线整理了版式、链接和媒体显示。
