Linux and UNIX Man Pages

Linux & Unix Commands - Search Man Pages

unlockpt(3c) [hpux man page]

unlockpt(3C)															      unlockpt(3C)

NAME
unlockpt - unlock a STREAMS pty master and slave pair SYNOPSIS
DESCRIPTION
The passed parameter, fildes, is a file descriptor that is returned from a successful open of a master pty (pseudo-terminal) device. The function unlocks a slave pty from its associated master counterpart. It does this by clearing a lock flag so that the slave pty can be opened. For security reason, grantpt(3C) must be executed before unlockpt(3C). RETURN VALUE
Upon successful completion, the function returns a value of 0 (zero). Otherwise, it returns a value of -1. Failure may result under the following conditions: o The file descriptor specified by the fildes parameter is not an open file descriptor. o The file descriptor specified by the fildes parameter is not associated with a STREAMS pty master device. EXAMPLES
The following example shows how is typically used. ... AUTHOR
was developed by HP and OSF. SEE ALSO
open(2), grantpt(3C), ptsname(3C), ptm(7), pts(7), ptem(7). unlockpt(3C)

Check Out this Related Man Page

grantpt(3C)															       grantpt(3C)

NAME
grantpt - grant access to the STREAMS slave pty SYNOPSIS
DESCRIPTION
The passed parameter, fildes, is a file descriptor that is returned from a successful open of a STREAMS master pty (pseudo-terminal) device. The function modifies the ownership and mode of the slave pty device special file associated with its master pty counterpart. A root program is spawned to change ownership and mode of the pty slave device file in the following way: The group ID is set to a reserved group named "tty". The slave user ID is set to the effective owner of the calling process. The permissions of the slave device are set so that the owner is allowed read and write access and the group is allowed write access. RETURN VALUE
Upon successful completion, the function returns a value of 0 (zero). Otherwise, it returns a value of -1. Failure may result under the following conditions: o The file descriptor specified by the fildes parameter is not an open file descriptor. o The file descriptor specified by the fildes parameter is not associated with a STREAMS master pty device. o The corresponding slave pty device cannot be accessed. WARNINGS
The function may also fail if the application has installed a signal handler to catch the SIGCHLD (death of a child) signal. EXAMPLES
The following example shows how is typically used. ... AUTHOR
was developed by HP and OSF. SEE ALSO
open(2), unlockpt(3C), ptsname(3C), ptm(7), pts(7), ptem(7), ldterm(7). grantpt(3C)
Man Page