struct fds_t *p;
TAILQ_FOREACH(p, &nsjconf->open_fds, pointers) {
if (p->fd == fd) {
- LOG_D("FD=%d will be passed to the child process", fd);
return true;
}
}
continue;
}
if (containPassFd(nsjconf, fd)) {
+ LOG_D("FD=%d will be passed to the child process", fd);
TEMP_FAILURE_RETRY(fcntl(fd, F_SETFD, flags & ~(FD_CLOEXEC)));
} else {
TEMP_FAILURE_RETRY(fcntl(fd, F_SETFD, flags | FD_CLOEXEC));
return false;
}
if (containPassFd(nsjconf, fd)) {
+ LOG_D("FD=%d will be passed to the child process", fd);
TEMP_FAILURE_RETRY(fcntl(fd, F_SETFD, flags & ~(FD_CLOEXEC)));
} else {
+ LOG_D("FD=%d will be closed before execve()", fd);
TEMP_FAILURE_RETRY(fcntl(fd, F_SETFD, flags | FD_CLOEXEC));
}
}