From 590695bcf6a6a4dae899d76ea6cbcbd4f53651e1 Mon Sep 17 00:00:00 2001 From: Simon Schubert Date: Wed, 22 Jul 2009 01:20:54 +0200 Subject: [PATCH] dma: don't block on lock/opening the mbox file, backoff instead --- libexec/dma/local.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/libexec/dma/local.c b/libexec/dma/local.c index 5515177a64..109bd2b889 100644 --- a/libexec/dma/local.c +++ b/libexec/dma/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); -- 2.41.0