getsid - get session ID
pid_t getsid(pid_t pid);
getsid(0) returns the session ID of the calling process. getsid(p)
returns the session ID of the process with process ID p.
On error, -1 will be returned. The only error which can happen is
ESRCH, when no process with process ID p was found.
SVr4, which documents an additional EPERM error condition.
Linux 1.3.85 1996-04-11 GETSID(2)
[ Back ]