Lines Matching refs:mailFd
688 fork_job(const char *user, int mailFd, CronLine *line, bool run_sendmail) in fork_job() argument
714 if (mailFd >= 0) { in fork_job()
715 xmove_fd(mailFd, run_sendmail ? 0 : 1); in fork_job()
743 if (mailFd >= 0) { in fork_job()
744 close(mailFd); in fork_job()
752 int mailFd = -1; in start_one_job() local
760 mailFd = open(mailFile, O_CREAT | O_TRUNC | O_WRONLY | O_EXCL | O_APPEND, 0600); in start_one_job()
762 if (mailFd >= 0) { in start_one_job()
763 fdprintf(mailFd, "To: %s\nSubject: cron: %s\n\n", line->cl_mailto, in start_one_job()
765 line->cl_empty_mail_size = lseek(mailFd, 0, SEEK_CUR); in start_one_job()
772 line->cl_pid = fork_job(user, mailFd, line, /*sendmail?*/ 0); in start_one_job()
773 if (mailFd >= 0) { in start_one_job()
793 int mailFd; in process_finished_job() local
813 mailFd = open(mailFile, O_RDONLY); in process_finished_job()
815 if (mailFd < 0) { in process_finished_job()
819 if (fstat(mailFd, &sbuf) < 0 in process_finished_job()
825 close(mailFd); in process_finished_job()
830 line->cl_pid = fork_job(user, mailFd, line, /*sendmail?*/ 1); in process_finished_job()