[dovecot-cvs] dovecot/src/lib ioloop-notify-dn.c,1.15,1.15.2.1
cras at dovecot.org
cras at dovecot.org
Thu Aug 10 18:54:25 EEST 2006
Update of /var/lib/cvs/dovecot/src/lib
In directory talvi:/tmp/cvs-serv7755
Modified Files:
Tag: branch_1_0
ioloop-notify-dn.c
Log Message:
Silently disable dnotify if kernel doesn't support RT signals, instead of
just dying.
Index: ioloop-notify-dn.c
===================================================================
RCS file: /var/lib/cvs/dovecot/src/lib/ioloop-notify-dn.c,v
retrieving revision 1.15
retrieving revision 1.15.2.1
diff -u -d -r1.15 -r1.15.2.1
--- ioloop-notify-dn.c 9 Apr 2006 19:37:29 -0000 1.15
+++ ioloop-notify-dn.c 10 Aug 2006 15:54:23 -0000 1.15.2.1
@@ -161,8 +161,15 @@
sigemptyset(&act.sa_mask);
act.sa_flags = SA_SIGINFO | SA_RESTART | SA_NODEFER;
- if (sigaction(SIGRTMIN, &act, NULL) < 0)
- i_fatal("sigaction(SIGRTMIN) failed: %m");
+ if (sigaction(SIGRTMIN, &act, NULL) < 0) {
+ if (errno == EINVAL) {
+ /* kernel is too old to understand even RT
+ signals, so there's no way dnotify works */
+ ctx->disabled = TRUE;
+ } else {
+ i_fatal("sigaction(SIGRTMIN) failed: %m");
+ }
+ }
}
}
More information about the dovecot-cvs
mailing list