[ Previous | Next | Contents | Glossary | Home | Search ]
AIX Version 4.3 Base Operating System and Extensions Technical Reference, Volume 2

unlockpt Subroutine


Unlocks a pseudo-terminal device.


Standard C Library (libc.a)


#include <stdlib.h>
int unlockpt (FileDescriptor)
int FileDescriptor;


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.


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.

Implementation Specifics

This subroutine is part of Base Operating System (BOS) Runtime.

Related Information

The grantpt subroutine.

The Input and Output Handling Programmer's Overview in AIX Version 4.3 General Programming Concepts: Writing and Debugging Programs.

[ Previous | Next | Contents | Glossary | Home | Search ]