grant access to the slave pseudo-terminal device
int grantpt(int fildes);
The function grantpt changes the mode and ownership of the
slave pseudo-terminal device associated with its master
pseudo-terminal counter part.
fildes is the file descriptor returned from a successful
open of the master pseudo-terminal device.
A setuid root program [see
is invoked to change the permissions.
The user ID of the slave is set to the real
owner of the calling process and the group ID is set to a
The permission mode of the slave pseudo-terminal is set to readable,
writable by the owner and writable by the group.
Upon successful completion, the function grantpt returns
0; otherwise it returns -1.
Failure could occur if fildes is not an open file
descriptor, if fildes is not associated with a master pseudo-terminal device,
or if the corresponding slave device could not be accessed.
© 2004 The SCO Group, Inc. All rights reserved.
UnixWare 7 Release 7.1.4 - 25 April 2004