[exim-cvs] Docs: add note on daemon shutdown

Startseite
Nachricht löschen
Nachricht beantworten
Autor: Exim Git Commits Mailing List
Datum:  
To: exim-cvs
Betreff: [exim-cvs] Docs: add note on daemon shutdown
Gitweb: https://git.exim.org/exim.git/commitdiff/dbb05434c6730ae4a13d5879f6df652d93cd6019
Commit:     dbb05434c6730ae4a13d5879f6df652d93cd6019
Parent:     f108ec74c278b14363dc9ad1274596f284d21868
Author:     Jeremy Harris <jgh146exb@???>
AuthorDate: Fri Jan 27 20:02:58 2023 +0000
Committer:  Jeremy Harris <jgh146exb@???>
CommitDate: Fri Jan 27 21:15:57 2023 +0000


    Docs: add note on daemon shutdown
---
 doc/doc-docbook/spec.xfpt | 8 ++++++++
 src/src/exim.c            | 1 +
 2 files changed, 9 insertions(+)


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