]> git.pld-linux.org Git - packages/exim.git/blame - exim-force-sigalrm.patch
- rel 9; fixes pipe transport bug (#2257)
[packages/exim.git] / exim-force-sigalrm.patch
CommitLineData
60791d8d
AM
1--- exim-4.69.org/src/daemon.c 2009-06-01 23:02:02.505119117 +0200
2+++ exim-4.69/src/daemon.c 2009-06-01 23:09:58.088404461 +0200
3@@ -25,7 +25,7 @@
4
5 static smtp_slot empty_smtp_slot = { 0, NULL };
6
7-
8+static time_t sigalrm_seen_last;
9
10 /*************************************************
11 * Local static variables *
12@@ -1603,6 +1603,8 @@
13
14 smtp_input = TRUE;
15
16+time(&sigalrm_seen_last);
17+
18 /* Enter the never-ending loop... */
19
20 for (;;)
362e143b
AM
21@@ -1753,6 +1753,8 @@
22 {
23 DEBUG(D_any) debug_printf("SIGALRM received\n");
60791d8d 24
362e143b 25+ time(&sigalrm_seen_last);
60791d8d 26+
362e143b
AM
27 /* Do a full queue run in a child process, if required, unless we already
28 have enough queue runners on the go. If we are not running as root, a
29 re-exec is required. */
60791d8d
AM
30@@ -1885,11 +1889,19 @@
31
32 else
33 {
34+ int time_diff;
35 struct timeval tv;
36 tv.tv_sec = queue_interval;
37 tv.tv_usec = 0;
38 select(0, NULL, NULL, NULL, &tv);
39 handle_ending_processes();
40+
41+ time_diff = (int)difftime(time(NULL), sigalrm_seen_last);
42+ if ((queue_interval > 0) && (time_diff > (2*queue_interval)))
43+ {
44+ sigalrm_seen = TRUE;
1a03923d 45+ log_write(0, LOG_MAIN|LOG_PANIC, "daemon: queue-runner not run for %ds. Forcing. Is SIGALRM delivery broken on this system ?", time_diff);
60791d8d
AM
46+ }
47 }
48
49 /* Re-enable the SIGCHLD handler if it has been run. It can't do it
This page took 0.054694 seconds and 4 git commands to generate.