pcntl_unshare
Description
The pcntl_unshare of PCNTL for PHP dissociates parts of the process execution context.
Syntax
pcntl_unshare( int $flags ): bool
Parameters
flags
The flags parameter is a bitmask that specifies which parts of the execution context should be unshared. This parameter is specified by ORing together zero or more of the CLONE_* constants: CLONE_NEWNS, CLONE_NEWIPC, CLONE_NEWUTS, CLONE_NEWNET, CLONE_NEWPID, CLONE_NEWUSER, and CLONE_NEWCGROUP.
Return
Returns 0 on success, -1 otherwise. On failure it sets an error code, that can be retrieved with pcntl_get_last_error().
Examples
1 · flags · CLONE_NEWNS
<? $flags = CLONE_NEWNS; $return = pcntl_unshare($flags); var_export($return); ?>
false
2 · flags · CLONE_NEWIPC
<? $flags = CLONE_NEWIPC; $return = pcntl_unshare($flags); var_export($return); ?>
false
3 · flags · CLONE_NEWUTS
<? $flags = CLONE_NEWUTS; $return = pcntl_unshare($flags); var_export($return); ?>
false
4 · flags · CLONE_NEWNET
<? $flags = CLONE_NEWNET; $return = pcntl_unshare($flags); var_export($return); ?>
false
5 · flags · CLONE_NEWPID
<? $flags = CLONE_NEWPID; $return = pcntl_unshare($flags); var_export($return); ?>
false
6 · flags · CLONE_NEWUSER
<? $flags = CLONE_NEWUSER; $return = pcntl_unshare($flags); var_export($return); ?>
false
Links
PCNTL
- pcntl_alarm
- pcntl_async_signals
- pcntl_errno
- pcntl_exec
- pcntl_fork
- pcntl_get_last_error
- pcntl_getpriority
- pcntl_rfork
- pcntl_setpriority
- pcntl_signal
- pcntl_signal_dispatch
- pcntl_signal_get_handler
- pcntl_sigprocmask
- pcntl_sigtimedwait
- pcntl_sigwaitinfo
- pcntl_strerror
- pcntl_wait
- pcntl_waitpid
- pcntl_wexitstatus
- pcntl_wifexited
- pcntl_wifsignaled
- pcntl_wifstopped
- pcntl_wstopsig
- pcntl_wtermsig