pty_alloc_slave
if ((error = pty_alloc_slave(l, &sfd, newdev, mp)) != 0)
static int pty_alloc_slave(struct lwp *, int *, dev_t, struct mount *);