F_SETFD
(void) fcntl(SHIN = dcopy(0, FSHIN), F_SETFD, FD_CLOEXEC);
(void) fcntl(SHOUT = dcopy(1, FSHOUT), F_SETFD, FD_CLOEXEC);
(void) fcntl(SHERR = dcopy(2, FSHERR), F_SETFD, FD_CLOEXEC);
(void) fcntl(OLDSTD = dcopy(SHIN, FOLDSTD), F_SETFD, FD_CLOEXEC);
(void) fcntl(SHIN, F_SETFD, FD_CLOEXEC);
(void) fcntl(dcopy(f, FSHTTY), F_SETFD, FD_CLOEXEC);
(void) fcntl(unit, F_SETFD, FD_CLOEXEC);
fcntl(i, F_SETFD, FD_CLOEXEC);
fcntl(nfd, F_SETFD, FD_CLOEXEC);
fcntl(fd, F_SETFD, FD_CLOEXEC);
fcntl(fd, F_SETFD, FD_CLOEXEC);
(void)fcntl(fd, F_SETFD, flags | FD_CLOEXEC);
fcntl(pdes[target], F_SETFD, flags & ~FD_CLOEXEC)
fcntl(pdes[target], F_SETFD, flags & ~FD_CLOEXEC);
fcntl(fd, F_SETFD, flags & ~FD_CLOEXEC) == -1))
fcntl(fd, F_SETFD, tmp | FD_CLOEXEC);
case F_SETFD:
fcntl(fd, F_SETFD, fcntl(fd, F_GETFD) | FD_CLOEXEC);
fcntl(fd, F_SETFD, fcntl(fd, F_GETFD) | FD_CLOEXEC);
fcntl(fd, F_SETFD, fcntl(fd, F_GETFD) | FD_CLOEXEC);
fcntl(fd, F_SETFD, fcntl(fd, F_GETFD) | FD_CLOEXEC);
fcntl(fd, F_SETFD, fcntl(fd, F_GETFD) | FD_CLOEXEC);
fcntl(fd, F_SETFD, fcntl(fd, F_GETFD) | O_CLOEXEC);
if (fcntl(fd1, F_SETFD, 1) != 0)
if (fcntl(fd1, F_SETFD, 1) != 0)
if (fcntl(fd1, F_SETFD, 1) != 0)
if (fcntl(fd, F_SETFD, FD_CLOEXEC))
} else if (fcntl(fd, F_SETFD, 0) == -1)
} else if (fcntl(fd, F_SETFD, 0) == -1)
} else if (fcntl(fd, F_SETFD, 0) == -1)
} else if (fcntl(fd, F_SETFD, 0) == -1)
} else if (fcntl(fd, F_SETFD, 0) == -1)
case F_SETFD:
(void) fcntl(fileno(fp), F_SETFD, FD_CLOEXEC);
(void)fcntl(p[READ], F_SETFD, FD_CLOEXEC);
(void)fcntl(p[WRITE], F_SETFD, FD_CLOEXEC);
(void)fcntl(fileno(fp), F_SETFD, FD_CLOEXEC);
(void)fcntl(fileno(fp), F_SETFD, FD_CLOEXEC);
if (fcntl(sock, F_SETFD, FD_CLOEXEC) == -1 ||
(void)fcntl(rfd, F_SETFD, FD_CLOEXEC);
(void)fcntl(wfd, F_SETFD, FD_CLOEXEC);
(void)fcntl(efd, F_SETFD, FD_CLOEXEC);
if (fcntl(x, F_SETFD, FD_CLOEXEC) == -1) \
(void)fcntl(sock, F_SETFD, FD_CLOEXEC);
if (fcntl(sock, F_SETFD, 0) == -1) /* keep the socket on exec */
if (fcntl(listen_sock, F_SETFD, FD_CLOEXEC) == -1) {
if (tty_log_fd != -1 && fcntl(tty_log_fd, F_SETFD, FD_CLOEXEC) == -1)
if (fcntl(fd, F_SETFD, FD_CLOEXEC) == -1)
} else if (fcntl(fd, F_SETFD, 0) == -1)
fcntl(s_in[0], F_SETFD, FD_CLOEXEC);
fcntl(s_out[0], F_SETFD, FD_CLOEXEC);
fcntl(s_err[0], F_SETFD, FD_CLOEXEC);
} else if (fcntl(fd, F_SETFD, 0) == -1)
} else if (fcntl(fd, F_SETFD, 0) == -1)
} else if (fcntl(fd, F_SETFD, 0) == -1)
} else if (fcntl(fd, F_SETFD, 0) == -1)
fcntl(fdsig[0], F_SETFD, FD_CLOEXEC) == -1 ||
fcntl(fdsig[1], F_SETFD, FD_CLOEXEC) == -1)
fcntl(nsd->verifier_pipe[0], F_SETFD, FD_CLOEXEC);
fcntl(nsd->verifier_pipe[1], F_SETFD, FD_CLOEXEC);
if(fcntl(sock->s, F_SETFD, FD_CLOEXEC) == -1) {
if (fcntl(CONSTRAINT_PASSFD, F_SETFD, FD_CLOEXEC) == -1)
} else if (fcntl(cfd, F_SETFD, 0) == -1)
} else if (fcntl(fd, F_SETFD, 0) == -1)
} else if (fcntl(fd, F_SETFD, 0) == -1)
} else if (fcntl(fd, F_SETFD, 0) == -1)
} else if (fcntl(fd, F_SETFD, 0) == -1)
fcntl(s_in[0], F_SETFD, FD_CLOEXEC);
fcntl(s_out[0], F_SETFD, FD_CLOEXEC);
fcntl(s_err[0], F_SETFD, FD_CLOEXEC);
} else if (fcntl(sp[0], F_SETFD, 0) == -1)
} else if (fcntl(fd, F_SETFD, 0) == -1)
} else if (fcntl(fds[1], F_SETFD, 0) == -1)
if (fcntl(fd, F_SETFD, FD_CLOEXEC) == -1) {
fcntl(env->vmd_psp_fd, F_SETFD, 0); /* psp device fd */