posix_openpt
int posix_openpt(int);
if ((fd = posix_openpt(O_RDWR)) == -1)
RL(hostfd = posix_openpt(O_RDWR|O_NOCTTY));
RL(hostfd = posix_openpt(O_RDWR|O_NOCTTY));
if ((fdm = posix_openpt(O_RDWR|O_NOCTTY)) == -1) {
if ((fdm = posix_openpt(O_RDWR|O_NONBLOCK|O_CLOEXEC|O_CLOFORK)) == -1) {
RL(hostfd = posix_openpt(O_RDWR|O_NOCTTY));