From: Simon Schubert Date: Tue, 21 Jul 2009 23:20:54 +0000 (+0200) Subject: dma: don't block on lock/opening the mbox file, backoff instead X-Git-Url: http://git.ipfire.org/cgi-bin/gitweb.cgi?a=commitdiff_plain;h=5445c73bc9e5e2d61971f50e6043e0c2edce2bd8;p=people%2Fms%2Fdma.git dma: don't block on lock/opening the mbox file, backoff instead --- diff --git a/local.c b/local.c index 5515177..109bd2b 100644 --- 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);