Linux and UNIX Man Pages

Linux & Unix Commands - Search Man Pages

tcgetsid(3) [freebsd man page]

TCGETSID(3)						   BSD Library Functions Manual 					       TCGETSID(3)

NAME
tcgetsid -- get session ID associated with a controlling terminal LIBRARY
Standard C Library (libc, -lc) SYNOPSIS
#include <sys/types.h> #include <termios.h> pid_t tcgetsid(int fd); DESCRIPTION
The tcgetsid() function returns the process group ID of the session leader for a controlling terminal specified by fd. ERRORS
If an error occurs, tcgetsid() returns -1 and the global variable errno is set to indicate the error, as follows: [EBADF] The fd argument is not a valid file descriptor. [ENOTTY] The calling process does not have a controlling terminal or the underlying terminal device represented by fd is not the controlling terminal. SEE ALSO
getsid(2), setsid(2), tcgetpgrp(3), tcsetsid(3) STANDARDS
The tcgetsid() function conforms to X/Open Portability Guide Issue 4, Version 2 (``XPG4.2''). BSD
April 15, 2008 BSD

Check Out this Related Man Page

tcgetsid(3)						   BSD Library Functions Manual 					       tcgetsid(3)

NAME
tcgetsid -- get the process group ID for the session leader for the controlling terminal SYNOPSIS
#include <termios.h> pid_t tcgetsid(int fildes); DESCRIPTION
The tcgetsid() function obtains the process group ID of the session for which the terminal specified by fildes is the controlling terminal. RETURN VALUES
Upon successful completion, tcgetsid() returns the process group ID associated with the terminal. Otherwise, a value of (pid_t)-1 is returned and errno is set to indicate the error. ERRORS
The tcgetsid() function will fail if: [EACCES] The fildes argument is not associated with a controlling terminal. [EBADF] The fildes argument is not a valid file descriptor. [ENOTTY] The file associated with fildes is not a terminal. SEE ALSO
getsid(2), setpgid(2), setsid(2), tcgetpgrp(3), termios(4) STANDARDS
The tcgetsid() function conforms to IEEE Std 1003.1-2001 (``POSIX.1''). BSD
December 20, 2003 BSD
Man Page

Featured Tech Videos