dovecot: If inotify_init() fails with EMFILE, give an understand...
dovecot at dovecot.org
dovecot at dovecot.org
Wed Jun 27 22:46:26 EEST 2007
details: http://hg.dovecot.org/dovecot/rev/498ef9bc33f1
changeset: 5814:498ef9bc33f1
user: Timo Sirainen <tss at iki.fi>
date: Wed Jun 27 22:46:21 2007 +0300
description:
If inotify_init() fails with EMFILE, give an understandable error message.
diffstat:
1 file changed, 6 insertions(+), 1 deletion(-)
src/lib/ioloop-notify-inotify.c | 7 ++++++-
diffs (17 lines):
diff -r 9b4987348cf6 -r 498ef9bc33f1 src/lib/ioloop-notify-inotify.c
--- a/src/lib/ioloop-notify-inotify.c Wed Jun 27 22:37:17 2007 +0300
+++ b/src/lib/ioloop-notify-inotify.c Wed Jun 27 22:46:21 2007 +0300
@@ -133,7 +133,12 @@ static struct ioloop_notify_handler_cont
ctx->inotify_fd = inotify_init();
if (ctx->inotify_fd == -1) {
- i_error("inotify_init() failed: %m");
+ if (errno != EMFILE)
+ i_error("inotify_init() failed: %m");
+ else {
+ i_warning("Inotify instance limit for user exceeded, "
+ "disabling.");
+ }
ctx->disabled = TRUE;
} else {
fd_close_on_exec(ctx->inotify_fd, TRUE);
More information about the dovecot-cvs
mailing list