Your Browser is not longer supported

Please use Google Chrome, Mozilla Firefox or Microsoft Edge to view the page correctly
Loading...

{{viewport.spaceProperty.prod}}

tcgetsid - get session ID of specified terminal

&pagelevel(4)&pagelevel

Syntax

#include <termios.h>

pid_t tcgetsid(int fildes); 

Description

tcgetsid() returns the process group ID of the session that is controlled by the terminal specified in fildes.

Return val.

Process group ID of the session associated with the specified terminal


if successful.

(pid_t)-1

otherwise. errno is set to indicate the error.

Errors

tcgetsid() will fail if:

 

EACCES

No controlling terminal is assigned to the fildes argument.

 

EBADF

The fildes argument is not a valid file descriptor.

 

ENOTTY

The file fildes is not a terminal.

See also

termios.h.