*nix Documentation Project
·  Home
 +   man pages
·  Linux HOWTOs
·  FreeBSD Tips
·  *niX Forums

  man pages->IRIX man pages -> grantpt (3c)              


grantpt(3C)							   grantpt(3C)

NAME    [Toc]    [Back]

     grantpt - grant access to the slave pseudo-terminal device

SYNOPSIS    [Toc]    [Back]

     #include <stdlib.h>

     int grantpt(int fildes);

DESCRIPTION    [Toc]    [Back]

     The function grantpt changes the mode and ownership of the	slave pseudoterminal
 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	setuid(2)] is
     invoked to	change the permissions.	 The user ID of	the slave is set to
     the effective owner of the	calling	process	and the	group ID is set	to a
     reserved group.  The permission mode of the slave pseudo-terminal is set
     to	readable, writeable by the owner and writeable by the group.

RETURN VALUE    [Toc]    [Back]

     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.

SEE ALSO    [Toc]    [Back]

     open(2), setuid(2), ptsname(3C), unlockpt(3C)

									PPPPaaaaggggeeee 1111
[ Back ]
 Similar pages
Name OS Title
ptsname IRIX get name of the slave pseudo-terminal device
pts HP-UX STREAMS slave pty (pseudo-terminal) driver
unlockpt IRIX unlock a pseudo-terminal master/slave pair
grantpt Tru64 Permit access to the slave pseudoterminal device
utx Tru64 UNIX terminal extension pseudo device
unlockpt FreeBSD pseudo-terminal access functions
ptsname FreeBSD pseudo-terminal access functions
grantpt FreeBSD pseudo-terminal access functions
posix_openpt FreeBSD pseudo-terminal access functions
telm HP-UX STREAMS Telnet slave (pseudo-terminal) driver, STREAMS Telnet master driver (used by telnetd only), respective
Copyright © 2004-2005 DeniX Solutions SRL
newsletter delivery service