Linux and UNIX Man Pages

Linux & Unix Commands - Search Man Pages

tcgetsid(3p) [centos man page]

TCGETSID(3P)						     POSIX Programmer's Manual						      TCGETSID(3P)

PROLOG
This manual page is part of the POSIX Programmer's Manual. The Linux implementation of this interface may differ (consult the correspond- ing Linux manual page for details of Linux behavior), or the interface may not be implemented on Linux. 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 shall obtain the process group ID of the session for which the terminal specified by fildes is the controlling ter- minal. RETURN VALUE
Upon successful completion, tcgetsid() shall return the process group ID associated with the terminal. Otherwise, a value of (pid_t)-1 shall be returned and errno set to indicate the error. ERRORS
The tcgetsid() function shall fail if: EBADF The fildes argument is not a valid file descriptor. ENOTTY The calling process does not have a controlling terminal, or the file is not the controlling terminal. The following sections are informative. EXAMPLES
None. APPLICATION USAGE
None. RATIONALE
None. FUTURE DIRECTIONS
None. SEE ALSO
The Base Definitions volume of IEEE Std 1003.1-2001, <termios.h> COPYRIGHT
Portions of this text are reprinted and reproduced in electronic form from IEEE Std 1003.1, 2003 Edition, Standard for Information Technol- ogy -- Portable Operating System Interface (POSIX), The Open Group Base Specifications Issue 6, Copyright (C) 2001-2003 by the Institute of Electrical and Electronics Engineers, Inc and The Open Group. In the event of any discrepancy between this version and the original IEEE and The Open Group Standard, the original IEEE and The Open Group Standard is the referee document. The original Standard can be obtained online at http://www.opengroup.org/unix/online.html . IEEE
/The Open Group 2003 TCGETSID(3P)

Check Out this Related Man Page

TCGETPGRP(3P)						     POSIX Programmer's Manual						     TCGETPGRP(3P)

PROLOG
This manual page is part of the POSIX Programmer's Manual. The Linux implementation of this interface may differ (consult the correspond- ing Linux manual page for details of Linux behavior), or the interface may not be implemented on Linux. NAME
tcgetpgrp - get the foreground process group ID SYNOPSIS
#include <unistd.h> pid_t tcgetpgrp(int fildes); DESCRIPTION
The tcgetpgrp() function shall return the value of the process group ID of the foreground process group associated with the terminal. If there is no foreground process group, tcgetpgrp() shall return a value greater than 1 that does not match the process group ID of any existing process group. The tcgetpgrp() function is allowed from a process that is a member of a background process group; however, the information may be subse- quently changed by a process that is a member of a foreground process group. RETURN VALUE
Upon successful completion, tcgetpgrp() shall return the value of the process group ID of the foreground process associated with the termi- nal. Otherwise, -1 shall be returned and errno set to indicate the error. ERRORS
The tcgetpgrp() function shall fail if: EBADF The fildes argument is not a valid file descriptor. ENOTTY The calling process does not have a controlling terminal, or the file is not the controlling terminal. The following sections are informative. EXAMPLES
None. APPLICATION USAGE
None. RATIONALE
None. FUTURE DIRECTIONS
None. SEE ALSO
setsid(), setpgid(), tcsetpgrp(), the Base Definitions volume of IEEE Std 1003.1-2001, <sys/types.h>, <unistd.h> COPYRIGHT
Portions of this text are reprinted and reproduced in electronic form from IEEE Std 1003.1, 2003 Edition, Standard for Information Technol- ogy -- Portable Operating System Interface (POSIX), The Open Group Base Specifications Issue 6, Copyright (C) 2001-2003 by the Institute of Electrical and Electronics Engineers, Inc and The Open Group. In the event of any discrepancy between this version and the original IEEE and The Open Group Standard, the original IEEE and The Open Group Standard is the referee document. The original Standard can be obtained online at http://www.opengroup.org/unix/online.html . IEEE
/The Open Group 2003 TCGETPGRP(3P)
Man Page