.\" Copyright Peter Benie <pjb1008@cam.ac.uk>
.\" University of Cambridge Computing Service
.\" Tue 19 May 1998
.TH GRANTPT 2 "19 May 1998" "Linux 2.0"
.SH NAME
grantpt \- grant access to the pty slave
.SH SYNOPSIS
.nf
.B #include <ptmx_fake.h>
.B cc [...] -lptmx_fake
.sp
.BI "int grantpt(int " fd );
.fi
.SH DESCRIPTION
.B grantpt
changes the owner and permissions of the pty slave by invoking the
setuid helper, pty_chmod. fd should be a pty master or the fake pty
multiplexor. This implementation should not be used with /dev/ptmx
from Linux 2.1 and above.
.SH RETURN VALUE
.B grantpt
returns zero on success, or \-1 if an error occurred. An error will
occur if fd is not a pty master or if the slave device cannot be
found.
.SH "SEE ALSO"
.BR unlockpt "(3), " pty_chmod (8)
.SH AUTHOR
Peter Benie <pjb1008@cam.ac.uk>
