]> git.ipfire.org Git - people/ms/dma.git/commitdiff
dma: don't block on lock/opening the mbox file, backoff instead
authorSimon Schubert <corecode@dragonflybsd.org>
Tue, 21 Jul 2009 23:20:54 +0000 (01:20 +0200)
committerSimon Schubert <corecode@dragonflybsd.org>
Tue, 21 Jul 2009 23:20:54 +0000 (01:20 +0200)
local.c

diff --git a/local.c b/local.c
index 5515177a643e257cc297199089bcfce532579df8..109bd2b88931f37adc955339553348dc75ea2ec6 100644 (file)
--- a/local.c
+++ b/local.c
@@ -30,7 +30,7 @@ deliver_local(struct qitem *it, const char **errmsg)
        }
 
        /* mailx removes users mailspool file if empty, so open with O_CREAT */
-       mbox = open_locked(fn, O_WRONLY | O_APPEND | O_CREAT);
+       mbox = open_locked(fn, O_WRONLY|O_APPEND|O_NONBLOCK|O_CREAT, 0660);
        if (mbox < 0) {
                syslog(LOG_NOTICE, "local delivery deferred: can not open `%s': %m", fn);
                return (1);