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
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_getpgid
- posix_getpgrp
- posix_getpid
- posix_getppid
- posix_getpwnam
- posix_getpwuid
- posix_getrlimit
- 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