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

posix_getpgid

Description

The posix_getpgid of POSIX for PHP gets the process group id for job control.

Syntax

posix_getpgid(
    int $process_id
): int|false

Parameters

process_id

The process id.

Return

Returns the identifier, as an int.

Examples

1 · process_id

<?

$process_id = posix_getppid();

$return = posix_getpgid($process_id);

echo $return;

?>
35

2 · posix_setpgid

<?

$process_id = posix_getppid();
$process_group_id = 40;

posix_setpgid($process_id, $process_group_id);

$return = posix_getpgid($process_id);

echo $return;

?>
40
HomeMenu