From b95bffd0bae1f4dcf763f209ee67c294646b73ae Mon Sep 17 00:00:00 2001 From: Simon Schubert Date: Wed, 22 Jul 2009 01:21:44 +0200 Subject: [PATCH 1/1] dma: don't block when trying to aquire a queue file We might race with some other process, so it is imperative to treat a locked file as a soft error instead of blocking on the file until the other process unlocks it. --- libexec/dma/spool.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/libexec/dma/spool.c b/libexec/dma/spool.c index d9d17e2839..9a74620220 100644 --- a/libexec/dma/spool.c +++ b/libexec/dma/spool.c @@ -308,7 +308,7 @@ aquirespool(struct qitem *it) int queuefd; if (it->queuef == NULL) { - queuefd = open_locked(it->queuefn, O_RDWR); + queuefd = open_locked(it->queuefn, O_RDWR|O_NONBLOCK); if (queuefd < 0) goto fail; it->queuef = fdopen(queuefd, "r+"); -- 2.41.0