Gitweb:
https://git.exim.org/exim.git/commitdiff/4c2efd7a1bc5b018f2e05a0d739fd856967e3de7
Commit: 4c2efd7a1bc5b018f2e05a0d739fd856967e3de7
Parent: b0ba87102e53501a3d4abfe29288b2efc7816fea
Author: Jeremy Harris <jgh146exb@???>
AuthorDate: Tue Feb 18 16:47:56 2020 +0000
Committer: Jeremy Harris <jgh146exb@???>
CommitDate: Wed Feb 19 00:19:06 2020 +0000
Move notifier socket to general availability
---
src/src/daemon.c | 15 +++------------
src/src/globals.c | 2 --
src/src/globals.h | 2 --
src/src/macros.h | 6 ++----
src/src/queue.c | 2 +-
5 files changed, 6 insertions(+), 21 deletions(-)
diff --git a/src/src/daemon.c b/src/src/daemon.c
index aedd3fb..b6c27ff 100644
--- a/src/src/daemon.c
+++ b/src/src/daemon.c
@@ -973,7 +973,6 @@ exim_exit(EXIT_SUCCESS, US"daemon");
}
-#ifdef EXPERIMENTAL_QUEUE_RAMP
/*************************************************
* Listener socket for local work prompts *
*************************************************/
@@ -1057,16 +1056,17 @@ for (struct cmsghdr * cp = CMSG_FIRSTHDR(&msg);
buf[sz] = 0;
switch (buf[0])
{
+#ifdef EXPERIMENTAL_QUEUE_RAMP
case NOTIFY_MSG_QRUN:
/* this should be a message_id */
DEBUG(D_queue_run)
debug_printf("%s: qrunner trigger: %s\n", __FUNCTION__, buf+1);
memcpy(queuerun_msgid, buf+1, MESSAGE_ID_LENGTH+1);
return TRUE;
+#endif /*EXPERIMENTAL_QUEUE_RAMP*/
}
return FALSE;
}
-#endif /*EXPERIMENTAL_QUEUE_RAMP*/
/*************************************************
@@ -1514,10 +1514,7 @@ if (f.background_daemon)
/* We are now in the disconnected, daemon process (unless debugging). Set up
the listening sockets if required. */
-#ifdef EXPERIMENTAL_QUEUE_RAMP
-if (queue_fast_ramp)
- daemon_notifier_socket();
-#endif
+daemon_notifier_socket();
if (f.daemon_listen && !f.inetd_wait_mode)
{
@@ -2048,10 +2045,8 @@ for (;;)
/* Close any open listening sockets in the child */
-#ifdef EXPERIMENTAL_QUEUE_RAMP
if (daemon_notifier_fd >= 0)
(void) close(daemon_notifier_fd);
-#endif
for (int sk = 0; sk < listen_socket_count; sk++)
(void) close(listen_sockets[sk]);
@@ -2184,10 +2179,8 @@ for (;;)
fd_set select_listen;
FD_ZERO(&select_listen);
-#ifdef EXPERIMENTAL_QUEUE_RAMP
if (daemon_notifier_fd >= 0)
FD_SET(daemon_notifier_fd, &select_listen);
-#endif
for (int sk = 0; sk < listen_socket_count; sk++)
{
FD_SET(listen_sockets[sk], &select_listen);
@@ -2244,7 +2237,6 @@ for (;;)
if (!select_failed)
{
-#ifdef EXPERIMENTAL_QUEUE_RAMP
if ( daemon_notifier_fd >= 0
&& FD_ISSET(daemon_notifier_fd, &select_listen))
{
@@ -2252,7 +2244,6 @@ for (;;)
sigalrm_seen = daemon_notification();
break; /* to top of daemon loop */
}
-#endif
for (int sk = 0; sk < listen_socket_count; sk++)
if (FD_ISSET(listen_sockets[sk], &select_listen))
{
diff --git a/src/src/globals.c b/src/src/globals.c
index 458ab48..a06aa5c 100644
--- a/src/src/globals.c
+++ b/src/src/globals.c
@@ -740,9 +740,7 @@ cut_t cutthrough = {
.nrcpt = 0, /* number of addresses */
};
-#ifdef EXPERIMENTAL_QUEUE_RAMP
int daemon_notifier_fd = -1;
-#endif
uschar *daemon_smtp_port = US"smtp";
int daemon_startup_retries = 9;
int daemon_startup_sleep = 30;
diff --git a/src/src/globals.h b/src/src/globals.h
index 88751f3..760863a 100644
--- a/src/src/globals.h
+++ b/src/src/globals.h
@@ -447,9 +447,7 @@ typedef struct {
} cut_t;
extern cut_t cutthrough; /* Deliver-concurrently */
-#ifdef EXPERIMENTAL_QUEUE_RAMP
extern int daemon_notifier_fd; /* Unix socket for notifications */
-#endif
extern uschar *daemon_smtp_port; /* Can be a list of ports */
extern int daemon_startup_retries; /* Number of times to retry */
extern int daemon_startup_sleep; /* Sleep between retries */
diff --git a/src/src/macros.h b/src/src/macros.h
index ca61f53..7f50dbb 100644
--- a/src/src/macros.h
+++ b/src/src/macros.h
@@ -1100,9 +1100,7 @@ should not be one active. */
#define SVFMT_TAINT_NOCHK BIT(2)
-#ifdef EXPERIMENTAL_QUEUE_RAMP
-# define NOTIFIER_SOCKET_NAME "exim_daemon_notify"
-# define NOTIFY_MSG_QRUN 1 /* Notify message types */
-#endif
+#define NOTIFIER_SOCKET_NAME "exim_daemon_notify"
+#define NOTIFY_MSG_QRUN 1 /* Notify message types */
/* End of macros.h */
diff --git a/src/src/queue.c b/src/src/queue.c
index 3c72ead..5f75470 100644
--- a/src/src/queue.c
+++ b/src/src/queue.c
@@ -346,7 +346,7 @@ const pcre *selectstring_regex_sender = NULL;
uschar *log_detail = NULL;
int subcount = 0;
uschar subdirs[64];
-pid_t qpid[1] = {0}; /* Parallelism factor for q2stage 1st phase */
+pid_t qpid[4] = {0}; /* Parallelism factor for q2stage 1st phase */
#ifdef MEASURE_TIMING
report_time_since(×tamp_startup, US"queue_run start");