summaryrefslogtreecommitdiffstats
path: root/extra/dovecot/dovecot-1.1.11-bdc5391e52df.patch
blob: ac1dc25989c176b6ba347687f91e4d2c96c3ab54 (plain)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49

# HG changeset patch
# User Timo Sirainen <tss@iki.fi>
# Date 1234226629 18000
# Node ID bdc5391e52dfe4590e9e291eba2603ed87caef57
# Parent 4ddf36b9ee8182f10d8d69af6577b677cda282a0
master: Don't crash if auth process dies too early.

--- 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");
 	}
--- 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);
 }
--- 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