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
Links
POSIX
- posix_access
- posix_ctermid
- posix_eaccess
- posix_errno
- posix_fpathconf
- posix_get_last_error
- posix_getcwd
- posix_getegid
- posix_geteuid
- posix_getgid
- posix_getgrgid
- posix_getgrnam
- posix_getgroups
- posix_getlogin
- posix_getpgrp
- posix_getpid
- posix_getppid
- posix_getpwnam
- posix_getpwuid
- posix_getrlimit
- posix_getsid
- posix_getuid
- posix_initgroups
- posix_isatty
- posix_kill
- posix_mkfifo
- posix_mknod
- posix_pathconf
- posix_setegid
- posix_seteuid
- posix_setgid
- posix_setpgid
- posix_setrlimit
- posix_setsid
- posix_setuid
- posix_strerror
- posix_sysconf
- posix_times
- posix_ttyname
- posix_uname