grant access to the slave pseudo-terminal device
# include <stdlib.h>
int grantpt(int fildes);
changes the mode and ownership of the
slave pseudo-terminal device associated with its master
pseudo-terminal counter part.
fildes is a file descriptor
referencing the master pseudo-terminal device.
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.
On successful completion,
returns 0; otherwise it returns -1.
Under the following conditions,
fails and sets errno to:
fildes is not a valid open file descriptor.
fildes is not associated with a master pseudo-terminal device.
the corresponding slave device could not be accessed.
The current implementation of
If the caller has SIGCHLD (or SIGCLD)
signal handlers set up,
these handlers will be triggered by the call on
for further information.
is conformant with:
X/Open CAE Specification, System Interfaces and Headers, Issue 4, Version 2.
© 2003 Caldera International, Inc. All rights reserved.
SCO OpenServer Release 5.0.7 -- 11 February 2003