1TCGETSID(3)                Linux Programmer's Manual               TCGETSID(3)
2
3
4

NAME

6       tcgetsid - get session ID
7

SYNOPSIS

9       #include <termios.h>
10
11       pid_t tcgetsid(int fd);
12

DESCRIPTION

14       The  function  tcgetsid() returns the session ID of the current session
15       that has the terminal associated to fd as controlling  terminal.   This
16       terminal must be the controlling terminal of the calling process.
17

RETURN VALUE

19       When fd refers to the controlling terminal of our session, the function
20       tcgetsid() will return the session ID of this session.   Otherwise,  -1
21       is returned, and errno is set appropriately.
22

ERRORS

24       EBADF  fd is not a valid file descriptor.
25
26       ENOTTY The  calling process does not have a controlling terminal, or it
27              has one but it is not described by fd.
28

NOTES

30       This function is implemented via the TIOCGSID  ioctl(),  present  since
31       Linux 2.1.71.
32

CONFORMING TO

34       POSIX.1-2001
35

SEE ALSO

37       getsid(2)
38
39
40
41POSIX                             2003-01-30                       TCGETSID(3)
Impressum