Museum

Home

Lab Overview

Retrotechnology Articles

⇒ Online Manual

Media Vault

Software Library

Restoration Projects

Artifacts Sought

Related Articles

openpty(3)

unlockpt(3)  —  Subroutines

NAME

unlockpt - Unlocks a pseudoterminal master and slave pair

LIBRARY

Standard C Library (libc.a)

SYNOPSIS

int unlockpt(
int mastfd);

PARAMETERS

mastfdSpecifies a file descriptor that is returned from a successful open of the master pty device. 

DESCRIPTION

The unlockpt() function unlocks a slave pty from its associated master counterpart.  It does this by clearing a lock flag so that the slave device can be opened. 

RETURN VALUE

Upon successful completion, the unlockpt() function returns a value of 0.  Otherwise, it returns a value of -1. 

Failure may result under the following conditions:

       •The file descriptor specified by the mastfd parameter is not associated with a master pty. 

       •The file descriptor specified by the masfd parameter is not an open file descriptor. 

RELATED INFORMATION

Functions: openpty(3). 

Guides: System V Compatibility User’s Guide

Typewritten Software • bear@typewritten.org • Edmonds, WA 98026