Warning: main(/www/www/htdocs/style/globals.php) [function.main]: failed to open stream: No such file or directory in /www/www/docs/6.4.1/neutrino/lib_ref/t/tcsetsid.html on line 1
Warning: main() [function.include]: Failed opening '/www/www/htdocs/style/globals.php' for inclusion (include_path='.:/www/www/common:/www/www/php/lib/php') in /www/www/docs/6.4.1/neutrino/lib_ref/t/tcsetsid.html on line 1
Warning: main(/www/www/htdocs/style/header.php) [function.main]: failed to open stream: No such file or directory in /www/www/docs/6.4.1/neutrino/lib_ref/t/tcsetsid.html on line 8
Warning: main() [function.include]: Failed opening '/www/www/htdocs/style/header.php' for inclusion (include_path='.:/www/www/common:/www/www/php/lib/php') in /www/www/docs/6.4.1/neutrino/lib_ref/t/tcsetsid.html on line 8
Make a terminal device a controlling device
#include <termios.h>
int tcsetsid( int fd,
pid_t pid );
- fd
- A file descriptor that's associated with the device that you want to
make a controlling device.
- pid
- The ID of the process that you want to associate with the controlling
device.
libc
Use the -l c option to
qcc
to link against this library.
This library is usually included automatically.
The tcsetsid() 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.
You can clear the controlling terminal by passing -1 as fd.
- 0
- Success.
- -1
- Failure; errno is set.
- EBADF
- Invalid file descriptor.
- EINVAL
- The argument pid is invalid.
- ENOSYS, ENOTTY
- The argument fd isn't associated with a terminal device.
QNX Neutrino
Safety: | |
Cancellation point |
No |
Interrupt handler |
No |
Signal handler |
No |
Thread |
Yes |
ioctl(),
tcgetsid()
Warning: main(/www/www/htdocs/style/footer.php) [function.main]: failed to open stream: No such file or directory in /www/www/docs/6.4.1/neutrino/lib_ref/t/tcsetsid.html on line 155
Warning: main() [function.include]: Failed opening '/www/www/htdocs/style/footer.php' for inclusion (include_path='.:/www/www/common:/www/www/php/lib/php') in /www/www/docs/6.4.1/neutrino/lib_ref/t/tcsetsid.html on line 155