update page now
PHP 8.4.22 Released!

pcntl_setns

(No version information available, might only be in Git)

pcntl_setnsReassociate the calling process with a namespace of another process

Описание

function pcntl_setns(?int $process_id = null, int $nstype = CLONE_NEWNET): bool

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).

Список параметров

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.

Возвращаемые значения

Функция возвращает true, если выполнилась успешно, или false, если возникла ошибка.

Смотрите также

  • pcntl_unshare() - Разделяет части контекста выполнения процесса
Добавить

Примечания пользователей

Пользователи ещё не добавляли примечания для страницы
To Top