diff options
author | peter <peter@FreeBSD.org> | 1998-08-04 13:56:32 +0000 |
---|---|---|
committer | peter <peter@FreeBSD.org> | 1998-08-04 13:56:32 +0000 |
commit | e0fcaa07d2408a1d03d13f511c35e030b08813cc (patch) | |
tree | 9ebfc3008e6a8eeb4a5abd69fbe4e9d6994b32d2 /contrib | |
parent | 04a0df2514506f6c0691dbf848c063069f665fd2 (diff) | |
download | FreeBSD-src-e0fcaa07d2408a1d03d13f511c35e030b08813cc.zip FreeBSD-src-e0fcaa07d2408a1d03d13f511c35e030b08813cc.tar.gz |
I obviously cannot read. I misread the ifdef in the Makefile - DONT_FSYNC
was not on by default.. Back previous change out.
Diffstat (limited to 'contrib')
-rw-r--r-- | contrib/sendmail/mail.local/mail.local.8 | 5 | ||||
-rw-r--r-- | contrib/sendmail/mail.local/mail.local.c | 22 |
2 files changed, 13 insertions, 14 deletions
diff --git a/contrib/sendmail/mail.local/mail.local.8 b/contrib/sendmail/mail.local/mail.local.8 index 3bc0a77..7aa7cdb 100644 --- a/contrib/sendmail/mail.local/mail.local.8 +++ b/contrib/sendmail/mail.local/mail.local.8 @@ -40,12 +40,11 @@ Turn off the attempts to notify the .Dq biff service. .It Fl s -Turn on the +Turn off the .Xr fsync 2 call that forces the mailbox to be committed to disk before returning a .Dq success -status. (This can configured in the flags passed through from -.Xr sendmail 8 ). +status. .El .Pp Individual mail messages in the mailbox are delimited by an empty diff --git a/contrib/sendmail/mail.local/mail.local.c b/contrib/sendmail/mail.local/mail.local.c index 09a66c4..2a3b072 100644 --- a/contrib/sendmail/mail.local/mail.local.c +++ b/contrib/sendmail/mail.local/mail.local.c @@ -239,7 +239,7 @@ main(argc, argv) char *argv[]; { struct passwd *pw; - int ch, fd, nobiff, dofsync; + int ch, fd, nobiff, nofsync; uid_t uid; char *from; extern char *optarg; @@ -260,7 +260,7 @@ main(argc, argv) from = NULL; nobiff = 0; - dofsync = 0; + nofsync = 0; while ((ch = getopt(argc, argv, "bdf:r:ls")) != -1) switch(ch) { case 'b': @@ -280,7 +280,7 @@ main(argc, argv) lmtpmode++; break; case 's': - dofsync++; + nofsync++; break; case '?': default: @@ -290,7 +290,7 @@ main(argc, argv) argv += optind; if (lmtpmode) - dolmtp(nobiff, dofsync); + dolmtp(nobiff, nofsync); if (!*argv) usage(); @@ -315,7 +315,7 @@ main(argc, argv) * at the expense of repeated failures and multiple deliveries. */ for (fd = store(from, 0); *argv; ++argv) - deliver(fd, *argv, nobiff, dofsync); + deliver(fd, *argv, nobiff, nofsync); exit(eval); } @@ -431,8 +431,8 @@ process_recipient(addr) #define RCPT_GROW 30 void -dolmtp(nobiff, dofsync) - int nobiff, dofsync; +dolmtp(nobiff, nofsync) + int nobiff, nofsync; { char *return_path = NULL; char **rcpt_addr = NULL; @@ -477,7 +477,7 @@ dolmtp(nobiff, dofsync) if (p != NULL) *p++ = '\0'; deliver(msgfd, rcpt_addr[i], nobiff, - dofsync); + nofsync); } close(msgfd); goto rset; @@ -680,10 +680,10 @@ store(from, lmtprcpts) } void -deliver(fd, name, nobiff, dofsync) +deliver(fd, name, nobiff, nofsync) int fd; char *name; - int nobiff, dofsync; + int nobiff, nofsync; { struct stat fsb, sb; struct passwd *pw; @@ -851,7 +851,7 @@ tryagain: } /* Flush to disk, don't wait for update. */ - if (dofsync && fsync(mbfd)) { + if (!nofsync && fsync(mbfd)) { mailerr("450 4.2.0", "%s: %s", path, strerror(errno)); err3: if (setreuid(0, 0) < 0) { |