diff options
Diffstat (limited to 'src')
| -rw-r--r-- | src/emacs.c | 11 |
1 files changed, 11 insertions, 0 deletions
diff --git a/src/emacs.c b/src/emacs.c index 861d70735ca..130a9f8fc8e 100644 --- a/src/emacs.c +++ b/src/emacs.c | |||
| @@ -2019,6 +2019,10 @@ all of which are called before Emacs is actually killed. */ | |||
| 2019 | { | 2019 | { |
| 2020 | int exit_code; | 2020 | int exit_code; |
| 2021 | 2021 | ||
| 2022 | #ifdef HAVE_LIBSYSTEMD | ||
| 2023 | sd_notify(0, "STOPPING=1"); | ||
| 2024 | #endif /* HAVE_LIBSYSTEMD */ | ||
| 2025 | |||
| 2022 | /* Fsignal calls emacs_abort () if it sees that waiting_for_input is | 2026 | /* Fsignal calls emacs_abort () if it sees that waiting_for_input is |
| 2023 | set. */ | 2027 | set. */ |
| 2024 | waiting_for_input = 0; | 2028 | waiting_for_input = 0; |
| @@ -2479,6 +2483,13 @@ from the parent process and its tty file descriptors. */) | |||
| 2479 | error ("This function can only be called after loading the init files"); | 2483 | error ("This function can only be called after loading the init files"); |
| 2480 | #ifndef WINDOWSNT | 2484 | #ifndef WINDOWSNT |
| 2481 | 2485 | ||
| 2486 | if (daemon_type == 1) | ||
| 2487 | { | ||
| 2488 | #ifdef HAVE_LIBSYSTEMD | ||
| 2489 | sd_notify(0, "READY=1"); | ||
| 2490 | #endif /* HAVE_LIBSYSTEMD */ | ||
| 2491 | } | ||
| 2492 | |||
| 2482 | if (daemon_type == 2) | 2493 | if (daemon_type == 2) |
| 2483 | { | 2494 | { |
| 2484 | int nfd; | 2495 | int nfd; |