Lines Matching defs:mailfd
480 int mailfd;
492 mailfd = open(toybuf, O_RDONLY);
494 if (mailfd < 0) return;
496 if (fstat(mailfd, &sb) == -1 || sb.st_uid != 0 || sb.st_nlink != 0
498 xclose(mailfd);
502 do_fork(cfile, job, mailfd, "sendmail");
550 int mailfd = -1;
555 if ((mailfd = open(toybuf, O_CREAT|O_TRUNC|O_WRONLY|O_EXCL|O_APPEND,
560 dprintf(mailfd, "To: %s\nSubject: cron: %s\n\n", cfile->mailto, job->cmd);
561 job->mailsize = lseek(mailfd, 0, SEEK_CUR);
563 do_fork(cfile, job, mailfd, NULL);
564 if (mailfd >= 0) {