Jesus · Bible · HTML · CSS · JS · PHP · SVG · Applications

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
HomeMenu