Updated: April 19, 2023 |
Get the process group ID of the session leader for a controlling terminal
#include <termios.h> pid_t tcgetsid( int filedes );
libc
Use the -l c option to qcc to link against this library. This library is usually included automatically.
The tcgetsid() function returns the process group ID of the session for which the terminal specified by filedes is the controlling terminal.
The process group ID associated with the terminal, or -1 if an error occurred (errno is set).
Safety: | |
---|---|
Cancellation point | No |
Interrupt handler | No |
Signal handler | Yes |
Thread | Yes |