filedes An open file descriptor. name Pointer to a buffer in which the terminal name is stored. namesize The length of the buffer pointed to by the name argument.