This version of this document is no longer maintained. For the latest documentation, see http://www.qnx.com/developers/docs. |
Get a fully qualified pathname for a file
#include <unistd.h> int ttyname_r( int fildes, char* name, size_t namesize );
libc
Use the -l c option to qcc to link against this library. This library is usually included automatically.
The ttyname_r() function stores the null-terminated pathname of the terminal associated with the file descriptor fildes in the character array referenced by name. The array is namesize characters long and should have space for the name and the terminating NULL character.
Zero for success, or an error number.
Safety: | |
---|---|
Cancellation point | No |
Interrupt handler | No |
Signal handler | Yes |
Thread | Yes |
ctermid(), errno, setsid(), ttyname()