Путеводитель по Руководству Linux

  User  |  Syst  |  Libr  |  Device  |  Files  |  Other  |  Admin  |  Head  |



   tcgetsid.3p    ( 3 )

получить идентификатор группы процессов для лидера сеанса для управляющего терминала (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.

Имя (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 terminal.

Возвращаемое значение (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.

Ошибки (Error)

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 POSIX.1‐2017, termios.h(0p)