dovecot-1.1: master: Don't crash if auth process dies too early.
dovecot at dovecot.org
dovecot at dovecot.org
Tue Feb 10 02:44:13 EET 2009
details: http://hg.dovecot.org/dovecot-1.1/rev/bdc5391e52df
changeset: 8157:bdc5391e52df
user: Timo Sirainen <tss at iki.fi>
date: Mon Feb 09 19:43:49 2009 -0500
description:
master: Don't crash if auth process dies too early.
diffstat:
3 files changed, 8 insertions(+), 2 deletions(-)
src/master/auth-process.c | 2 +-
src/master/child-process.c | 7 ++++++-
src/master/child-process.h | 1 +
diffs (43 lines):
diff -r 4ddf36b9ee81 -r bdc5391e52df src/master/auth-process.c
--- a/src/master/auth-process.c Thu Feb 05 18:29:06 2009 -0500
+++ b/src/master/auth-process.c Mon Feb 09 19:43:49 2009 -0500
@@ -353,7 +353,7 @@ static void auth_process_destroy(struct
if (!p->initialized && io_loop_is_running(ioloop) && !p->external) {
/* log the process exit and kill ourself */
- child_processes_deinit();
+ child_processes_flush();
log_deinit();
i_fatal("Auth process died too early - shutting down");
}
diff -r 4ddf36b9ee81 -r bdc5391e52df src/master/child-process.c
--- a/src/master/child-process.c Thu Feb 05 18:29:06 2009 -0500
+++ b/src/master/child-process.c Mon Feb 09 19:43:49 2009 -0500
@@ -219,10 +219,15 @@ void child_processes_init(void)
lib_signals_set_handler(SIGCHLD, TRUE, sigchld_handler, NULL);
}
-void child_processes_deinit(void)
+void child_processes_flush(void)
{
/* make sure we log if child processes died unexpectedly */
sigchld_handler(SIGCHLD, NULL);
+}
+
+void child_processes_deinit(void)
+{
+ child_processes_flush();
lib_signals_unset_handler(SIGCHLD, sigchld_handler, NULL);
hash_destroy(&processes);
}
diff -r 4ddf36b9ee81 -r bdc5391e52df src/master/child-process.h
--- a/src/master/child-process.h Thu Feb 05 18:29:06 2009 -0500
+++ b/src/master/child-process.h Mon Feb 09 19:43:49 2009 -0500
@@ -40,6 +40,7 @@ void child_process_set_destroy_callback(
child_process_destroy_callback_t *cb);
void child_processes_init(void);
+void child_processes_flush(void);
void child_processes_deinit(void);
#endif
More information about the dovecot-cvs
mailing list