1tcgetsid(3C)             Standard C Library Functions             tcgetsid(3C)
2
3
4

NAME

6       tcgetsid - get process group ID for session leader for controlling ter‐
7       minal
8

SYNOPSIS

10       #include <termios.h>
11
12       pid_t tcgetsid(int fildes);
13
14

DESCRIPTION

16       The tcgetsid() function obtains the process group ID of the session for
17       which the terminal specified by fildes is the controlling terminal.
18

RETURN VALUES

20       Upon  successful  completion,  tcgetsid()  returns the process group ID
21       associated with the terminal.   Otherwise,  a  value  of  (pid_t)−1  is
22       returned and errno is set to indicate the error.
23

ERRORS

25       The tcgetsid() function will fail if:
26
27       EACCES    The fildes argument is not associated with a controlling ter‐
28                 minal.
29
30
31       EBADF     The fildes argument is not a valid file descriptor.
32
33
34       ENOTTY    The file associated with fildes is not a terminal.
35
36

ATTRIBUTES

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

SEE ALSO

52       attributes(5), standards(5), termio(7I)
53
54
55
56SunOS 5.11                        14 Aug 2002                     tcgetsid(3C)
Impressum