dovecot-1.2: master: Don't crash if auth process dies too early.
dovecot at dovecot.org
dovecot at dovecot.org
Tue Feb 10 02:44:15 EET 2009
details: http://hg.dovecot.org/dovecot-1.2/rev/f8fdabb30c0a
changeset: 8735:f8fdabb30c0a
user: Timo Sirainen <tss at iki.fi>
date: Mon Feb 09 19:44:07 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 f8e407d832b8 -r f8fdabb30c0a src/master/auth-process.c
--- a/src/master/auth-process.c Fri Feb 06 18:08:56 2009 -0500
+++ b/src/master/auth-process.c Mon Feb 09 19:44:07 2009 -0500
@@ -355,7 +355,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 f8e407d832b8 -r f8fdabb30c0a src/master/child-process.c
--- a/src/master/child-process.c Fri Feb 06 18:08:56 2009 -0500
+++ b/src/master/child-process.c Mon Feb 09 19:44:07 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_table_destroy(&processes);
}
diff -r f8e407d832b8 -r f8fdabb30c0a src/master/child-process.h
--- a/src/master/child-process.h Fri Feb 06 18:08:56 2009 -0500
+++ b/src/master/child-process.h Mon Feb 09 19:44:07 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