summaryrefslogtreecommitdiff
path: root/gnu
diff options
context:
space:
mode:
authorLudovic Courtès <ludo@gnu.org>2025-08-26 11:52:25 +0200
committerLudovic Courtès <ludo@gnu.org>2025-09-03 12:34:13 +0200
commitb377ec079d9ffe8f0f372c43735ad012ea889b6f (patch)
tree9c6b77c7ef57ef4ef76741012e74e94cc63cc272 /gnu
parent1c235670d8d6b6b50c5d08cc29d7c52a0ea3bd8d (diff)
services: nginx: Ensure ‘stop’ is synchronous.
Fixes guix/maintenance#17. Fixes a bug whereby ‘nginx -s stop’ might return before the main nginx process has actually stopped, which in turn would lead ‘herd restart nginx’ to hang. * gnu/services/web.scm (nginx-shepherd-service): Change ‘stop’ to use ‘make-kill-destructor’. Reported-by: Maxim Cournoyer <maxim@guixotic.coop> Change-Id: I69e8626aab07f806ddc8b1d09d9f0e052a85cf47
Diffstat (limited to 'gnu')
-rw-r--r--gnu/services/web.scm7
1 files changed, 6 insertions, 1 deletions
diff --git a/gnu/services/web.scm b/gnu/services/web.scm
index d08122353f5..f811497ae1c 100644
--- a/gnu/services/web.scm
+++ b/gnu/services/web.scm
@@ -907,7 +907,12 @@ of index files."
(modules `((ice-9 match)
,@%default-modules))
(start (nginx-action "-p" run-directory))
- (stop (nginx-action "-s" "stop"))
+
+ ;; Instead of invoking "nginx -s stop", use
+ ;; 'make-kill-destructor', which waits for the main process to
+ ;; actually terminate.
+ (stop #~(make-kill-destructor))
+
(actions
(list
(shepherd-configuration-action config-file)