GETSID(3) Library Functions Manual GETSID(3)
NAME
getsid — get the
process group ID of session leader
SYNOPSIS
#include <unistd.h> pid_t getsid(pid_t pid);
DESCRIPTION
The getsid() function obtains the process group ID of the process that is the session leader of the process specified by pid . If pid is ( pid_t )0, it specifies the calling process.
RETURN VALUE
Upon successful completion, getsid() returns the process group ID of the session leader of the specified process. Otherwise, it returns ( pid_t )-1 and sets errno to indicate the error.
ERRORS
The getsid() function will fail if:
EXAMPLES
None.
APPLICATION USAGE
None.
FUTURE DIRECTIONS
None.
SEE ALSO
exec(3) , fork(3) , getpid(3) , getpgid(3) , setpgid(3) , setsid(3) , <unistd.h> .
February 1997 posix.fail