[Go to CFHT Home Page] Man Pages
Back to Software Index  BORDER=0Manpage Top Level
    unlockpt(3C) manual page Table of Contents

Name

unlockpt - unlock a pseudo-terminal master/slave pair

Synopsis

int unlockpt(int fildes);

MT-Level

Safe

Description

The function unlockpt() clears a lock flag associated with the slave pseudo-terminal device associated with its master pseudo-terminal counterpart so that the slave pseudo-terminal device can be opened. fildes is a file descriptor returned from a successful open of a master pseudo-terminal device.

Return Values

Upon successful completion, the function unlockpt() returns 0; otherwise it returns -1. A failure may occur if fildes is not an open file descriptor or is not associated with a master pseudo-terminal device.

See Also

open(2) , grantpt(3C) , ptsname(3C)


Table of Contents