pty_isfree
if (pty_isfree(ptyfs->ptyfs_pty, 1))
if (pty_isfree(i, 0))
error = !pty_isfree(md, 1);
int pty_isfree(int, int);