1getsid(2)                        System Calls                        getsid(2)
2
3
4

NAME

6       getsid - get process group ID of session leader
7

SYNOPSIS

9       #include <unistd.h>
10
11       pid_t getsid(pid_t pid);
12
13

DESCRIPTION

15       The  getsid() function obtains the process group ID of the process that
16       is the session leader of the process  specified  by  pid.   If  pid  is
17       (pid_t)0, it specifies the calling process.
18

RETURN VALUES

20       Upon  successful  completion,  getsid() returns the process group ID of
21       the session leader of the  specified  process.  Otherwise,  it  returns
22       (pid_t)−1 and sets errno to indicate the error.
23

ERRORS

25       The getsid() function will fail if:
26
27       EPERM    The process specified by pid is not in the same session as the
28                calling process, and the implementation does not allow  access
29                to  the process group ID of the session leader of that process
30                from the calling process.
31
32
33       ESRCH    There is no process with a process ID equal to pid.
34
35

ATTRIBUTES

37       See attributes(5) for descriptions of the following attributes:
38
39
40
41
42       ┌─────────────────────────────┬─────────────────────────────┐
43ATTRIBUTE TYPE         │      ATTRIBUTE VALUE        │
44       ├─────────────────────────────┼─────────────────────────────┤
45       │Interface Stability          │Standard                     │
46       └─────────────────────────────┴─────────────────────────────┘
47

SEE ALSO

49       exec(2),  fork(2),  getpid(2),   getpgid(2),   setpgid(2),   setsid(2),
50       attributes(5), standards(5)
51
52
53
54SunOS 5.11                        22 Jan 1996                        getsid(2)
Impressum