'\"macro stdmacro
.if n .pH g3c.unlockpt @(#)unlockpt	40.4 of 10/10/89
.\" Copyright 1989 AT&T
.nr X
.if \nX=0 .ds x} unlockpt 3C "" "\&"
.if \nX=1 .ds x} unlockpt 3C ""
.if \nX=2 .ds x} unlockpt 3C "" "\&"
.if \nX=3 .ds x} unlockpt "" "" "\&"
.TH \*(x}
.SH NAME
\f4unlockpt\fP \- unlock a pseudo-terminal master/slave pair
.SH SYNOPSIS
.nf
\f4int unlockpt(int fildes\fP);
.fi
.SH DESCRIPTION
The function \f4unlockpt\fP() 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.
\f2fildes\f1 is a file descriptor returned from a successful open
of a master pseudo-terminal device.
.SH RETURN VALUE
Upon successful completion, the function \f4unlockpt\fP() returns 
\f40\f1; otherwise it returns \f4-1\f1. 
A failure may occur if \f2fildes\f1 is not an open file descriptor
or is not associated with a master pseudo-terminal device.
.SH "SEE ALSO"
.nf
\f4open\fP(2)
.sp .5
\f4grantpt\fP(3C), \f4ptsname\fP(3C)
.br
in the \f2Programmer's Guide: \s-1STREAMS\s0\fP.
.fi
