Lines Matching refs:fileno

591                 int fileno,  in setup_output()  argument
611 if (fileno == STDOUT_FILENO && params->stdout_fd >= 0) { in setup_output()
619 if (fileno == STDERR_FILENO && params->stderr_fd >= 0) { in setup_output()
629 if (fileno == STDERR_FILENO) { in setup_output()
642 return fileno; in setup_output()
646 return RET_NERRNO(dup2(STDOUT_FILENO, fileno)); in setup_output()
653 return open_terminal_as(exec_context_tty_path(context), O_WRONLY, fileno); in setup_output()
657 return RET_NERRNO(dup2(STDIN_FILENO, fileno)); in setup_output()
661 return fileno; in setup_output()
664 return open_null_as(O_WRONLY, fileno); in setup_output()
670 return open_null_as(O_WRONLY, fileno); in setup_output()
674 return RET_NERRNO(dup2(STDIN_FILENO, fileno)); in setup_output()
677 return open_terminal_as(exec_context_tty_path(context), O_WRONLY, fileno); in setup_output()
683 r = connect_logger_as(unit, context, params, o, ident, fileno, uid, gid); in setup_output()
686 fileno == STDOUT_FILENO ? "stdout" : "stderr"); in setup_output()
687 r = open_null_as(O_WRONLY, fileno); in setup_output()
698 if (fstat(fileno, &st) >= 0 && in setup_output()
699 (*journal_stream_ino == 0 || fileno == STDERR_FILENO)) { in setup_output()
709 return RET_NERRNO(dup2(socket_fd, fileno)); in setup_output()
712 assert(named_iofds[fileno] >= 0); in setup_output()
714 (void) fd_nonblock(named_iofds[fileno], false); in setup_output()
715 return RET_NERRNO(dup2(named_iofds[fileno], fileno)); in setup_output()
723 assert(context->stdio_file[fileno]); in setup_output()
726 streq_ptr(context->stdio_file[fileno], context->stdio_file[STDIN_FILENO]); in setup_output()
729 return RET_NERRNO(dup2(STDIN_FILENO, fileno)); in setup_output()
737 fd = acquire_path(context->stdio_file[fileno], flags, 0666 & ~context->umask); in setup_output()
741 return move_fd(fd, fileno, 0); in setup_output()