![]() |
![]() |
![]() |
![]() |
Make a terminal device a controlling device
#include <termios.h> int tcsetsid( int fd, pid_t pid );
libc
The tcsetid() function makes the terminal device associated with the file descriptor argument fd into a controlling terminal that's associated with the process pid. If successful, this call causes subsequent hangup conditions on the terminal device fd to generate a SIGHUP signal on the given process.
This call is equivalent to calling ioctl( fd, TIOCSCTTY ) to set the controlling terminal to the current process. The controlling terminal can be cleared by passing -1 as fd.
Safety: | |
---|---|
Cancellation point | No |
Interrupt handler | No |
Signal handler | No |
Thread | Yes |
![]() |
![]() |
![]() |
![]() |