Middleware, development tools, realtime operating system
software and services for superior embedded design


Home
QNX Community Resources
Developer Support
QNX Documentation Library
QNX Developer Support

QNX Developer Support

QNX Software Systems
Developer Resources
Blogs
Board support packages
Foundry27 projects
Forums
Hardware support listing
Online video tutorials
Product documentation
Technical Articles

[Previous] [Contents] [Index] [Next]

tcgetsid()

Get the process group ID of the session leader for a controlling terminal

Synopsis:

#include <unistd.h>

int tcgetsid( int filedes );

Arguments:

fildes
A file descriptor that's associated with the device whose ID you want to get.

Library:

libc

Use the -l c option to qcc to link against this library. This library is usually included automatically.

Description:

The tcgetsid() function returns the process group ID of the session for which the terminal specified by filedes is the controlling terminal.

Returns:

The process group ID associated with the terminal, or -1 if an error occurs (errno is set).

Errors:

EACCES
The filedes argument isn't associated with a controlling terminal.
EBADF
The filedes argument isn't a valid file descriptor.
ENOTTY
The file associated with filedes isn't a terminal.

Classification:

POSIX 1003.1 XSI

Safety:
Cancellation point No
Interrupt handler No
Signal handler Yes
Thread Yes

See also:

tcsetsid()


[Previous] [Contents] [Index] [Next]