4 * Basic Unix98 PTY functionality; assumes devpts mounted on /dev/pts
11 #include <sys/ioctl.h>
15 static char buffer[32]; /* Big enough to hold even a 64-bit pts no */
18 if ( ioctl(fd, TIOCGPTN, &ptyno) )
21 snprintf(buffer, sizeof buffer, "/dev/pts/%u", ptyno);
30 return ioctl(fd, TIOCSPTLCK, &unlock);