Lines Matching refs:mailfd
477 int mailfd; in sendmail() local
489 mailfd = open(toybuf, O_RDONLY); in sendmail()
491 if (mailfd < 0) return; in sendmail()
493 if (fstat(mailfd, &sb) == -1 || sb.st_uid != 0 || sb.st_nlink != 0 in sendmail()
495 xclose(mailfd); in sendmail()
499 do_fork(cfile, job, mailfd, "sendmail"); in sendmail()
547 int mailfd = -1; in execute_jobs() local
552 if ((mailfd = open(toybuf, O_CREAT|O_TRUNC|O_WRONLY|O_EXCL|O_APPEND, in execute_jobs()
557 dprintf(mailfd, "To: %s\nSubject: cron: %s\n\n", cfile->mailto, job->cmd); in execute_jobs()
558 job->mailsize = lseek(mailfd, 0, SEEK_CUR); in execute_jobs()
560 do_fork(cfile, job, mailfd, NULL); in execute_jobs()
561 if (mailfd >= 0) { in execute_jobs()