NAME | SYNOPSIS | LIBRARY | API RESTRICTIONS | DESCRIPTION | RETURN VALUES | ERRORS | ATTRIBUTES | SEE ALSO
#include <unistd.h>pid_t getsid(pid_t pid);
Standard C Library (libc, -lc)
The function or functions documented here may not be used safely in all application contexts with all APIs provided in the ChorusOS 5.0 product.
See API(5FEA) for details.
The session ID of the process identified by pid is returned by getsid(). If pid is zero, getsid() returns the session ID of the current process.
Upon successful completion, the function getsid() returns the session ID of the specified process; otherwise, it returns a value of -1 and sets errno to indicate an error.
The getsid() function will succeed unless:
if there is no process with a process ID equal to pid.
Note that an implementation may restrict this function call to processes within the same session ID as the calling process.
See attributes(5) for descriptions of the following attributes:
ATTRIBUTE TYPE | ATTRIBUTE VALUE |
---|---|
Interface Stability | Evolving |
NAME | SYNOPSIS | LIBRARY | API RESTRICTIONS | DESCRIPTION | RETURN VALUES | ERRORS | ATTRIBUTES | SEE ALSO