Lines Matching refs:fd
28 int fd = open("/dev/null", O_RDWR); in fpm_stdio_init_main() local
30 if (0 > fd) { in fpm_stdio_init_main()
35 if (0 > dup2(fd, STDIN_FILENO) || 0 > dup2(fd, STDOUT_FILENO)) { in fpm_stdio_init_main()
37 close(fd); in fpm_stdio_init_main()
40 close(fd); in fpm_stdio_init_main()
171 int fd = ev->fd; local
185 is_stdout = (fd == child->fd_stdout);
218 in_buf = read(fd, buf, max_buf_size - 1);
369 int fd; local
382 fd = open(fpm_global_config.error_log, O_WRONLY | O_APPEND | O_CREAT, S_IRUSR | S_IWUSR);
383 if (0 > fd) {
389 dup2(fd, fpm_globals.error_log_fd);
390 close(fd);
391 fd = fpm_globals.error_log_fd; /* for FD_CLOSEXEC to work */
393 fpm_globals.error_log_fd = fd;
398 if (0 > fcntl(fd, F_SETFD, fcntl(fd, F_GETFD) | FD_CLOEXEC)) {