posix_getpgid() returns NULL if the given pid doesn't exist and can therefore be used to determine if a particular pid refers to an existing process. Beware, however, that pids are recycled so this method can result in false positives.
posix_getpgid
(PHP 4, PHP 5)
posix_getpgid — Get process group id for job control
Descrierea
int posix_getpgid
( int $pid
)
Returns the process group identifier of the process pid .
Parametri
- pid
-
The process id.
Valorile întroarse
Returns the identifier, as an integer.
Exemple
Example #1 Example use of posix_getpgid()
<?php
$pid = posix_getppid();
echo posix_getpgid($pid); //35
?>
Note
Notă: This is a not POSIX function, but is common on BSD and System V systems. If the system does not support this function, then it will not be included at compile time. This may be checked with function_exists().
posix_getpgid
bozo_z_clown at yahoo dot com
03-Feb-2008 12:07
03-Feb-2008 12:07
