summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorJeremy Harris <jgh146exb@wizmail.org>2023-01-27 20:02:58 +0000
committerJeremy Harris <jgh146exb@wizmail.org>2023-01-27 21:15:57 +0000
commitdbb05434c6730ae4a13d5879f6df652d93cd6019 (patch)
tree5dec6fb665fdf48de904ac99bb787d4a5bb14d54
parentf108ec74c278b14363dc9ad1274596f284d21868 (diff)
Docs: add note on daemon shutdown
-rw-r--r--doc/doc-docbook/spec.xfpt8
-rw-r--r--src/src/exim.c1
2 files changed, 9 insertions, 0 deletions
diff --git a/doc/doc-docbook/spec.xfpt b/doc/doc-docbook/spec.xfpt
index cc5923069..dc4e38c4a 100644
--- a/doc/doc-docbook/spec.xfpt
+++ b/doc/doc-docbook/spec.xfpt
@@ -2810,6 +2810,14 @@ of Exim is installed. It is not necessary to do this when other files that are
referenced from the configuration (for example, alias files) are changed,
because these are reread each time they are used.
+.new
+Either a SIGTERM or a SIGINT signal should be used to cause the daemon
+to cleanly shut down.
+Subprocesses handling recceiving or delivering messages,
+or for scanning the queue,
+will not be affected by the termination of the daemon process.
+.wen
+
.cmdopt -bdf
This option has the same effect as &%-bd%& except that it never disconnects
from the controlling terminal, even when no debugging is specified.
diff --git a/src/src/exim.c b/src/src/exim.c
index 9072ffd54..c5de167c6 100644
--- a/src/src/exim.c
+++ b/src/src/exim.c
@@ -1923,6 +1923,7 @@ signal(SIGSEGV, segv_handler); /* log faults */
/* If running in a dockerized environment, the TERM signal is only
delegated to the PID 1 if we request it by setting an signal handler */
+
if (getpid() == 1) signal(SIGTERM, term_handler);
/* SIGHUP is used to get the daemon to reconfigure. It gets set as appropriate