Warning: main(/www/www/htdocs/style/globals.php) [function.main]: failed to open stream: No such file or directory in /www/www/docs/6.4.1/neutrino/lib_ref/g/getsid.html on line 1
Warning: main() [function.include]: Failed opening '/www/www/htdocs/style/globals.php' for inclusion (include_path='.:/www/www/common:/www/www/php/lib/php') in /www/www/docs/6.4.1/neutrino/lib_ref/g/getsid.html on line 1
Warning: main(/www/www/htdocs/style/header.php) [function.main]: failed to open stream: No such file or directory in /www/www/docs/6.4.1/neutrino/lib_ref/g/getsid.html on line 8
Warning: main() [function.include]: Failed opening '/www/www/htdocs/style/header.php' for inclusion (include_path='.:/www/www/common:/www/www/php/lib/php') in /www/www/docs/6.4.1/neutrino/lib_ref/g/getsid.html on line 8
Get the session ID of a process
#include <unistd.h>
pid_t getsid( pid_t pid );
- pid
- The process ID for the process whose session ID you want to get.
libc
Use the -l c option to
qcc
to link against this library.
This library is usually included automatically.
The getsid() function determines the session ID for the given
process ID, pid.
The session ID, or -1 if an error occurs
(errno
is set).
- EPERM
- The process specified by pid is not in the same
session as the calling process. The implementation doesn't
allow access to the process group ID of the session leader from the calling process.
- EINVAL
- There isn't a process with the given ID.
POSIX 1003.1 XSI
Safety: | |
Cancellation point |
No |
Interrupt handler |
No |
Signal handler |
No |
Thread |
Yes |
errno,
setsid()
Warning: main(/www/www/htdocs/style/footer.php) [function.main]: failed to open stream: No such file or directory in /www/www/docs/6.4.1/neutrino/lib_ref/g/getsid.html on line 126
Warning: main() [function.include]: Failed opening '/www/www/htdocs/style/footer.php' for inclusion (include_path='.:/www/www/common:/www/www/php/lib/php') in /www/www/docs/6.4.1/neutrino/lib_ref/g/getsid.html on line 126