dovecot-2.0: lib-master: Ignore SIGALRM and SIGPIPE as early as ...
dovecot at dovecot.org
dovecot at dovecot.org
Sat Feb 20 18:20:24 EET 2010
details: http://hg.dovecot.org/dovecot-2.0/rev/aee98ecae688
changeset: 10796:aee98ecae688
user: Timo Sirainen <tss at iki.fi>
date: Sat Feb 20 18:20:20 2010 +0200
description:
lib-master: Ignore SIGALRM and SIGPIPE as early as possible.
For example alarm() is used while reading configuration, which is done
before master_service_init_finish().
diffstat:
src/lib-master/master-service.c | 6 ++++--
1 files changed, 4 insertions(+), 2 deletions(-)
diffs (23 lines):
diff -r 7394d1b828f7 -r aee98ecae688 src/lib-master/master-service.c
--- a/src/lib-master/master-service.c Sat Feb 20 18:19:32 2010 +0200
+++ b/src/lib-master/master-service.c Sat Feb 20 18:20:20 2010 +0200
@@ -115,6 +115,10 @@
is properly initialized */
i_set_failure_prefix(t_strdup_printf("%s(init): ", name));
+ /* ignore these signals as early as possible */
+ lib_signals_ignore(SIGPIPE, TRUE);
+ lib_signals_ignore(SIGALRM, FALSE);
+
if (getenv(MASTER_UID_ENV) == NULL)
flags |= MASTER_SERVICE_FLAG_STANDALONE;
@@ -318,8 +322,6 @@
/* set default signal handlers */
lib_signals_init();
- lib_signals_ignore(SIGPIPE, TRUE);
- lib_signals_ignore(SIGALRM, FALSE);
lib_signals_set_handler(SIGINT, TRUE, sig_die, service);
lib_signals_set_handler(SIGTERM, TRUE, sig_die, service);
if ((service->flags & MASTER_SERVICE_FLAG_TRACK_LOGIN_STATE) != 0) {
More information about the dovecot-cvs
mailing list