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

posix_getsid

Description

The posix_getsid of POSIX for PHP gets the current sid of the process.

Syntax

posix_getsid(
    int $process_id
): int|false

Parameters

process_id

The process identifier. If set to 0, the current process is assumed. If an invalid process_id is specified, then false is returned and an error is set which can be checked with posix_get_last_error().

Return

Returns the identifier, as an int, or false on failure.

Examples

1 · void

<?

$process_id = posix_getpid();

$return = posix_getsid($process_id);

echo $return;

?>
8805

2 · posix_setsid

<?

posix_setsid();

$process_id = posix_getpid();

$return = posix_getsid($process_id);

echo $return;

?>
8800
HomeMenu