Your Browser is not longer supported

Please use Google Chrome, Mozilla Firefox or Microsoft Edge to view the page correctly
Loading...

{{viewport.spaceProperty.prod}}

unlockpt - remove lock from master/slave pseudoterminal pair

&pagelevel(4)&pagelevel

Syntax

#include <stdlib.h>

int unlockpt (int fildes); 

Description

The unlockpt() function unlocks the slave pseudoterminal associated with the master pseudoterminal specified in fildes.

Portable applications must call unlockpt() before they open the slave side of a pseudoterminal device.

Return val.

0

-1

if successful.

otherwise. errno is set to indicate the error.

Errors

unlockpt() will fail if:

 

EBADF

The fildes argument is not a file descriptor open for writing.

 

EINVAL

The fildes argument is not assigned to a master pseudoterminal.

See also

grantpt(), open(), ptsname(), stdlib.h.