logo
Free, unlimited AI code reviews that run on commit
git-lrc git-lrc GitHub Install Now We'd appreciate a star git-lrc - Free, unlimited AI code reviews that run on commit | Product Hunt git-lrc - Free, unlimited AI code reviews that run on commit | Product Hunt

This manual page is part of the POSIX Programmer's Manual. The Linux implementation of this interface

Application Usage

       None.

Description

       The tcgetsid() function shall obtain the process group ID of the session for which the terminal specified
       by fildes is the controlling terminal.

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.

       Thefollowingsectionsareinformative.

Examples

       None.

Future Directions

       None.

Name

       tcgetsid — get the process group ID for the session leader for the controlling terminal

Prolog

       This  manual  page  is part of the POSIX Programmer's Manual.  The Linux implementation of this interface
       may differ (consult the corresponding Linux manual page for details of Linux behavior), or the  interface
       may not be implemented on Linux.

Rationale

       None.

Return Value

       Upon  successful  completion, tcgetsid() shall return the process group ID of the session associated with
       the terminal. Otherwise, a value of -1 shall be returned and errno set to indicate the error.

See Also

       The Base Definitions volume of POSIX.1‐2017, <termios.h>

Synopsis

       #include <termios.h>

       pid_t tcgetsid(int fildes);

See Also