summaryrefslogtreecommitdiff
path: root/3 Resources/Systemd/Systemd restart signal.md
diff options
context:
space:
mode:
authorJasper Ras <jras@hostnet.nl>2025-03-20 11:07:49 +0100
committerJasper Ras <jras@hostnet.nl>2025-03-20 11:07:49 +0100
commit80ccf68f55dbb70d7e5ed52ee95b3c9d1b6ce264 (patch)
tree93e28e85ab70052aa6f577998ec7dc1f413b40c0 /3 Resources/Systemd/Systemd restart signal.md
parent9642cd7ae24f0ba79ce5647c709b35ae8f06a285 (diff)
vault backup: 2025-03-20 11:07:48
Diffstat (limited to '3 Resources/Systemd/Systemd restart signal.md')
-rw-r--r--3 Resources/Systemd/Systemd restart signal.md25
1 files changed, 25 insertions, 0 deletions
diff --git a/3 Resources/Systemd/Systemd restart signal.md b/3 Resources/Systemd/Systemd restart signal.md
new file mode 100644
index 0000000..3497069
--- /dev/null
+++ b/3 Resources/Systemd/Systemd restart signal.md
@@ -0,0 +1,25 @@
+---
+tags:
+ - systemd
+ - restart
+references:
+ - https://www.reddit.com/r/linuxquestions/comments/10eu3i0/does_systemctl_restart_send_sigterm_signal/?rdt=64556
+---
+By default, `restart` does exactly the same thing as `stop` followed by `start`.
+
+`stop` will:
+
+- execute `ExecStop=` commands, if any;
+
+- send the signal defined by `KillSignal=` (default: `SIGTERM`), to any remaining processes identified by the `KillMode=`;
+
+- send `SIGCONT` to those same processes;
+
+- if `SendSIGHUP=` is true (default: false), send `SIGHUP` to those same processes;
+
+- if `SendSIGKILL=` is true (default: true), and any processes remain after `TimeoutStopSec=`, send the `FinalKillSignal=` (default: `SIGKILL`) to those remaining processes;
+
+- execute `ExecStopPost=` commands, if any.
+
+
+`restart` changes this by using `RestartKillSignal=` instead of `KillSignal=`, but if `RestartKillSignal=` is not set it just inherits its value from `KillSignal=`. And, of course, `restart` then performs all the regular `start` actions after everything else. `restart` also differs from `stop` by not flushing the file descriptor store associated with the service. \ No newline at end of file