GETPSEUDOTTY(3)

NAME
getpseudotty, ispseudotty - get or query pseudo terminals

SYNOPSIS

int getpseudotty(slave, master)
char **slave, **master;

int ispseudotty(ttyname)
char *ttyname;

DESCRIPTION
Getpseudotty locates an available pseudo terminal device pair and returns a open file descriptor of the master side opened for reading and writing. The pathname of the pair is returned through the slave and master arguments.

If getpseudotty is unable to find any available pseudo terminals, it returns -1.

Ispseudotty returns non-zero if ttyname is a valid pseudo terminal name. The expected format of ttyname is the pathname minus "/dev/" prefix.

FILES
/dev/getpty

SEE ALSO
pty(4)

BUGS
The return values of getpseudotty point to static data whose contents are overwritten by each call.