man-pages/man3/unlockpt.3

53 lines
1.1 KiB
Groff
Raw Normal View History

2004-11-03 13:51:07 +00:00
.\" Hey Emacs! This file is -*- nroff -*- source.
.\" This page is in the public domain. - aeb
.\"
2008-06-11 13:43:34 +00:00
.TH UNLOCKPT 3 2008-06-14 "" "Linux Programmer's Manual"
2004-11-03 13:51:07 +00:00
.SH NAME
unlockpt \- unlock a pseudoterminal master/slave pair
2004-11-03 13:51:07 +00:00
.SH SYNOPSIS
.nf
.BR "#define _XOPEN_SOURCE" " /* See feature_test_macros(7) */"
2004-11-03 13:51:07 +00:00
.br
.B #include <stdlib.h>
.sp
.BI "int unlockpt(int " fd ");"
.fi
.SH DESCRIPTION
The
.BR unlockpt ()
function unlocks the slave pseudoterminal device
corresponding to the master pseudoterminal referred to by
2004-11-03 13:51:07 +00:00
.IR fd .
.PP
.BR unlockpt ()
should be called before opening the slave side of a pseudoterminal.
2004-11-03 13:51:07 +00:00
.SH "RETURN VALUE"
When successful,
.BR unlockpt ()
2007-06-08 03:17:37 +00:00
returns 0.
Otherwise, it returns \-1 and sets
2004-11-03 13:51:07 +00:00
.I errno
appropriately.
.SH ERRORS
.TP
.B EBADF
The
.I fd
argument is not a file descriptor open for writing.
.TP
.B EINVAL
The
.I fd
argument is not associated with a master pseudoterminal.
2008-06-11 13:43:34 +00:00
.SH VERSIONS
.BR unlockpt ()
is provided in glibc since version 2.1.
2004-11-03 13:51:07 +00:00
.SH "CONFORMING TO"
2006-08-03 13:57:30 +00:00
POSIX.1-2001.
2004-11-03 13:51:07 +00:00
.SH "SEE ALSO"
.BR grantpt (3),
2004-12-17 12:46:00 +00:00
.BR posix_openpt (3),
.BR ptsname (3),
2005-10-10 13:14:12 +00:00
.BR pts (4),
.BR pty (7)