if (debug) log_d("process_fd: fcntl(%d, F_SETFD, FD_CLOEXEC) = %d", fd, rv);
static int process_fd(struct request *r){	int fd, rv;	if (r->path_args[0] && r->c->path_args_ok == 0 && (r->path_args[1] || r->isindex == 0)) {		r->error_file = r->c->error_404_file;		return 404;	}	if (r->method == M_POST)		return 405;	r->content_length = r->finfo.st_size;	r->last_modified = r->finfo.st_mtime;	if (r->last_modified <= r->ims) {		r->num_content = -1;		return 304;	}	if (r->method == M_GET) {		fd = open(r->path_translated, O_RDONLY);		if (debug)			log_d("process_fd: open(\"%s\") = %d", r->path_translated, fd);		if (fd == -1) {			switch (errno) {			case EACCES:				r->error_file = r->c->error_403_file;				return 403;			case EMFILE:				lerror("open");				return 503;			default:				lerror("open");				return 500;			}		}		rv = fcntl(fd, F_SETFD, FD_CLOEXEC);		if (debug)			log_d("process_fd: fcntl(%d, F_SETFD, FD_CLOEXEC) = %d", fd, rv);		r->cn->rfd = fd;	}	return 200;}