dovecot-1.0: If inotify_init() fails with EMFILE, give an unders...
dovecot at dovecot.org
dovecot at dovecot.org
Wed Jun 27 22:46:21 EEST 2007
details: http://hg.dovecot.org/dovecot-1.0/rev/5d841dcab6ab
changeset: 5328:5d841dcab6ab
user: Timo Sirainen <tss at iki.fi>
date: Wed Jun 27 22:46:15 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 111275296af5 -r 5d841dcab6ab src/lib/ioloop-notify-inotify.c
--- a/src/lib/ioloop-notify-inotify.c Wed Jun 27 16:38:06 2007 +0300
+++ b/src/lib/ioloop-notify-inotify.c Wed Jun 27 22:46:15 2007 +0300
@@ -155,7 +155,12 @@ void io_loop_notify_handler_init(struct
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;
return;
}
More information about the dovecot-cvs
mailing list