NAME
ggeettssiidd - get process session
LLIIBBRRAARRYYStandard C Library (libc, -lc)
SYNOPSIS
##iinncclluuddee <
pidt ggeettssiidd(pidt pid);> DESCRIPTION
The session ID of the process identified by pid is returned by ggeettssiidd(). If pid is zero, ggeettssiidd() returns the session ID of the current process.RETURN VALUES
Upon successful completion, the function ggeettssiidd() returns the session IDof the specified process; otherwise, it returns a value of -1 and sets
errno to indicate an error. EERRRROORRSS The ggeettssiidd() system call will fail if: [ESRCH] 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 ALSO
getpgid(2), getpgrp(2), setpgid(2), setsid(2), termios(4) HISTORYThe ggeettssiidd() function call appeared in FreeBSD 3.0. The ggeettssiidd() func-
tion call is derived from its usage in AT&T System V UNIX. BSD August 19, 1997 BSD