Get the process group ID of the session leader for a controlling terminal
#include <unistd.h> int tcgetsid( int filedes );
- A file descriptor that's associated with the device whose ID you want to get.
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 occurs ( errno is set).
- The filedes argument isn't associated with a controlling terminal.
- The filedes argument isn't a valid file descriptor.
- The file associated with filedes isn't a terminal.
Last modified: 2013-12-23