Lines Matching refs:mailfd
478 int mailfd; in sendmail() local
490 mailfd = open(toybuf, O_RDONLY); in sendmail()
492 if (mailfd < 0) return; in sendmail()
494 if (fstat(mailfd, &sb) == -1 || sb.st_uid != 0 || sb.st_nlink != 0 in sendmail()
496 xclose(mailfd); in sendmail()
500 do_fork(cfile, job, mailfd, "sendmail"); in sendmail()
548 int mailfd = -1; in execute_jobs() local
553 if ((mailfd = open(toybuf, O_CREAT|O_TRUNC|O_WRONLY|O_EXCL|O_APPEND, in execute_jobs()
558 dprintf(mailfd, "To: %s\nSubject: cron: %s\n\n", cfile->mailto, job->cmd); in execute_jobs()
559 job->mailsize = lseek(mailfd, 0, SEEK_CUR); in execute_jobs()
561 do_fork(cfile, job, mailfd, NULL); in execute_jobs()
562 if (mailfd >= 0) { in execute_jobs()