mirror of
https://codeberg.org/guix/guix.git
synced 2025-10-02 02:15:12 +00:00
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
This commit is contained in:
parent
1c235670d8
commit
b377ec079d
1 changed files with 6 additions and 1 deletions
|
@ -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)
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue