dovecot-2.2: stats plugin: Use nonblocking open() for stats fifo.
dovecot at dovecot.org
dovecot at dovecot.org
Mon Apr 22 21:51:06 EEST 2013
details: http://hg.dovecot.org/dovecot-2.2/rev/c95cea6e1389
changeset: 16308:c95cea6e1389
user: Timo Sirainen <tss at iki.fi>
date: Mon Apr 22 21:51:01 2013 +0300
description:
stats plugin: Use nonblocking open() for stats fifo.
This fixes hangs in it. Alternative would be to use alarm().
diffstat:
src/plugins/stats/stats-connection.c | 2 +-
1 files changed, 1 insertions(+), 1 deletions(-)
diffs (12 lines):
diff -r fe56ba75d6ef -r c95cea6e1389 src/plugins/stats/stats-connection.c
--- a/src/plugins/stats/stats-connection.c Mon Apr 22 18:45:04 2013 +0300
+++ b/src/plugins/stats/stats-connection.c Mon Apr 22 21:51:01 2013 +0300
@@ -23,7 +23,7 @@
if (conn->open_failed)
return FALSE;
- conn->fd = open(conn->path, O_WRONLY);
+ conn->fd = open(conn->path, O_WRONLY | O_NONBLOCK);
if (conn->fd == -1) {
i_error("stats: open(%s) failed: %m", conn->path);
conn->open_failed = TRUE;
More information about the dovecot-cvs
mailing list