unlockpt(3C) unlockpt(3C)
NAME
unlockpt - unlock a pseudo-terminal master/slave pair
SYNOPSIS
#include <stdlib.h>
int unlockpt(int fildes);
DESCRIPTION
The unlockpt() function unlocks the slave pseudo-terminal device asso-
ciated with the master to which fildes refers.
Portable applications must call unlockpt() before opening the slave
side of a pseudo-terminal device.
RETURN VALUE
Upon successful completion, unlockpt() returns 0. Otherwise, it
returns -1 and sets errno to indicate the error.
ERRORS
The following error code descriptions are function-specific. You will
find a general description in introprm2(2) or in errno(5).
The unlockpt() function may fail if:
EBADF The fildes argument is not a file descriptor open for writ-
ing.
EINVAL The fildes argument is not associated with a master pseudo-
terminal device.
SEE ALSO
open(2), grantpt(3C), ptsname(3C), stdlib(5).
Page 1 Reliant UNIX 5.44 Printed 11/98