# HG changeset patch # User Timo Sirainen # Date 1043135929 -7200 # Node ID 0fbafade2d85d877148bd12d6cf9cdf9640852c5 # Parent 070aee0e5b9ffb239632765abc1bc03506168d0f If auth/login process died unexpectedly, the exit status or killing signal wasn't logged. diff -r 070aee0e5b9f -r 0fbafade2d85 src/master/auth-process.c --- a/src/master/auth-process.c Tue Jan 21 09:42:33 2003 +0200 +++ b/src/master/auth-process.c Tue Jan 21 09:58:49 2003 +0200 @@ -160,8 +160,10 @@ struct auth_process **pos; struct waiting_request *next; - if (!p->initialized) - i_fatal("Auth process died too early - shutting down"); + if (!p->initialized) { + i_error("Auth process died too early - shutting down"); + io_loop_stop(ioloop); + } for (pos = &processes; *pos != NULL; pos = &(*pos)->next) { if (*pos == p) { diff -r 070aee0e5b9f -r 0fbafade2d85 src/master/common.h --- a/src/master/common.h Tue Jan 21 09:42:33 2003 +0200 +++ b/src/master/common.h Tue Jan 21 09:58:49 2003 +0200 @@ -18,6 +18,7 @@ PROCESS_TYPE_MAX }; +extern struct ioloop *ioloop; extern struct hash_table *pids; extern int null_fd, imap_fd, imaps_fd; diff -r 070aee0e5b9f -r 0fbafade2d85 src/master/login-process.c --- a/src/master/login-process.c Tue Jan 21 09:42:33 2003 +0200 +++ b/src/master/login-process.c Tue Jan 21 09:58:49 2003 +0200 @@ -223,8 +223,10 @@ return; p->destroyed = TRUE; - if (!p->initialized) - i_fatal("Login process died too early - shutting down"); + if (!p->initialized) { + i_error("Login process died too early - shutting down"); + io_loop_stop(ioloop); + } if (p->listening) listening_processes--; diff -r 070aee0e5b9f -r 0fbafade2d85 src/master/main.c --- a/src/master/main.c Tue Jan 21 09:42:33 2003 +0200 +++ b/src/master/main.c Tue Jan 21 09:58:49 2003 +0200 @@ -28,9 +28,9 @@ }; static const char *configfile = SYSCONFDIR "/" PACKAGE ".conf"; -static struct ioloop *ioloop; static struct timeout *to; +struct ioloop *ioloop; struct hash_table *pids; int null_fd, imap_fd, imaps_fd; @@ -259,6 +259,9 @@ if (lib_signal_kill != 0) i_warning("Killed with signal %d", lib_signal_kill); + /* make sure we log if child processes died unexpectedly */ + timeout_handler(NULL, NULL); + login_processes_deinit(); auth_processes_deinit(); ssl_deinit();