guix_mirror_bot pushed a commit to branch master
in repository guix.

commit b377ec079d9ffe8f0f372c43735ad012ea889b6f
Author: Ludovic Courtès <[email protected]>
AuthorDate: Tue Aug 26 11:52:25 2025 +0200

    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 <[email protected]>
    Change-Id: I69e8626aab07f806ddc8b1d09d9f0e052a85cf47
---
 gnu/services/web.scm | 7 ++++++-
 1 file changed, 6 insertions(+), 1 deletion(-)

diff --git a/gnu/services/web.scm b/gnu/services/web.scm
index d08122353f..f811497ae1 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)

Reply via email to