guix-commits
[Top][All Lists]
Advanced

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

[shepherd] 04/08: service: Remove unused variable in 'shutdown-services'


From: Ludovic Courtès
Subject: [shepherd] 04/08: service: Remove unused variable in 'shutdown-services'.
Date: Sat, 18 Mar 2023 18:36:36 -0400 (EDT)

civodul pushed a commit to branch master
in repository shepherd.

commit 51988c8b9b0ad71fb441362da2b6c6851a409d53
Author: Ludovic Courtès <ludo@gnu.org>
AuthorDate: Fri Mar 17 23:39:03 2023 +0100

    service: Remove unused variable in 'shutdown-services'.
    
    * modules/shepherd/service.scm (shutdown-services): Remove
    'running-services'.
---
 modules/shepherd/service.scm | 17 ++++++++---------
 1 file changed, 8 insertions(+), 9 deletions(-)

diff --git a/modules/shepherd/service.scm b/modules/shepherd/service.scm
index 91343ad..0d80db3 100644
--- a/modules/shepherd/service.scm
+++ b/modules/shepherd/service.scm
@@ -2463,15 +2463,14 @@ requested to be removed."
 
 (define (shutdown-services)
   "Shut down all the currently running services."
-  (let ((running-services '()))
-    ;; Note: Do not use 'for-each-service' since it introduces a continuation
-    ;; barrier via 'hash-fold', thereby preventing the 'stop' method from
-    ;; suspending via (@ (fibers) sleep), 'spawn-command', or similar.
-    (for-each
-     (lambda (service)
-       (when (running? service)
-         (stop service)))
-     (service-list))))
+  ;; Note: Do not use 'for-each-service' since it introduces a continuation
+  ;; barrier via 'hash-fold', thereby preventing the 'stop' method from
+  ;; suspending via (@ (fibers) sleep), 'spawn-command', or similar.
+  (for-each
+   (lambda (service)
+     (when (running? service)
+       (stop service)))
+   (service-list)))
 
 (define (check-for-dead-services)
   "Poll each process that we expect to be running, and respawn any which have



reply via email to

[Prev in Thread] Current Thread [Next in Thread]