[dovecot-cvs] dovecot/src/master auth-process.c,1.26,1.27 common.h,1.9,1.10 login-process.c,1.28,1.29 main.c,1.27,1.28

cras at procontrol.fi cras at procontrol.fi
Tue Jan 21 09:58:51 EET 2003


Update of /home/cvs/dovecot/src/master
In directory danu:/tmp/cvs-serv17686

Modified Files:
	auth-process.c common.h login-process.c main.c 
Log Message:
If auth/login process died unexpectedly, the exit status or killing signal
wasn't logged.



Index: auth-process.c
===================================================================
RCS file: /home/cvs/dovecot/src/master/auth-process.c,v
retrieving revision 1.26
retrieving revision 1.27
diff -u -d -r1.26 -r1.27
--- auth-process.c	21 Jan 2003 07:40:54 -0000	1.26
+++ auth-process.c	21 Jan 2003 07:58:49 -0000	1.27
@@ -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) {

Index: common.h
===================================================================
RCS file: /home/cvs/dovecot/src/master/common.h,v
retrieving revision 1.9
retrieving revision 1.10
diff -u -d -r1.9 -r1.10
--- common.h	5 Jan 2003 13:09:53 -0000	1.9
+++ common.h	21 Jan 2003 07:58:49 -0000	1.10
@@ -18,6 +18,7 @@
 	PROCESS_TYPE_MAX
 };
 
+extern struct ioloop *ioloop;
 extern struct hash_table *pids;
 extern int null_fd, imap_fd, imaps_fd;
 

Index: login-process.c
===================================================================
RCS file: /home/cvs/dovecot/src/master/login-process.c,v
retrieving revision 1.28
retrieving revision 1.29
diff -u -d -r1.28 -r1.29
--- login-process.c	11 Jan 2003 15:29:47 -0000	1.28
+++ login-process.c	21 Jan 2003 07:58:49 -0000	1.29
@@ -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--;
 

Index: main.c
===================================================================
RCS file: /home/cvs/dovecot/src/master/main.c,v
retrieving revision 1.27
retrieving revision 1.28
diff -u -d -r1.27 -r1.28
--- main.c	11 Jan 2003 15:29:47 -0000	1.27
+++ main.c	21 Jan 2003 07:58:49 -0000	1.28
@@ -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;
 
@@ -258,6 +258,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();




More information about the dovecot-cvs mailing list