summaryrefslogtreecommitdiff
path: root/3 Resources/Systemd/Systemd restart signal.md
diff options
context:
space:
mode:
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