pr_fcntl
flags = pr_fcntl(g_proc, fd, F_GETFL, NULL, 0);
(void) pr_fcntl(g_proc, tmpfd, F_DUP2FD,
(void) pr_fcntl(g_proc, *fdp, F_DUP2FD, (void *)(uintptr_t)fd,
(void) pr_fcntl(g_proc, tmpfd, F_DUP2FD, (void *)(uintptr_t)fd,
extern int pr_fcntl(struct ps_prochandle *, int, int, void *, void *);
fd = pr_fcntl(P, PRT_NULL_FD, F_DUPFD, (void *)farg0, NULL);
fd = pr_fcntl(P, PRT_NULL_FD, F_DUP2FD_CLOFORK, (void *)farg0, NULL);
fd = pr_fcntl(P, PRT_ZERO_FD, F_DUP3FD, (void *)farg0, (void *)farg1);