unlockpt Subroutine

Purpose

Unlocks a pseudo-terminal device.

Library

Standard C Library (libc.a)

Syntax

#include <stdlib.h>

int unlockpt ( FileDescriptor)
int FileDescriptor;

Description

The unlockpt subroutine unlocks the slave peudo-terminal device associated with the master peudo-terminal device defined by the FileDescriptor parameter. This subroutine has no effect if the environment variable XPG_SUS_ENV is not set equal to the string "ON", or if the BSD PTY driver is used.

Parameters

Item Description
FileDescriptor Specifies the file descriptor of the master pseudo-terminal device.

Return Values

Upon successful completion, a value of 0 is returned. Otherwise, a value of -1 is returned and the errno global variable is set to indicate the error.