unofficial mirror of guix-patches@gnu.org 
 help / color / mirror / code / Atom feed
* [bug#68357] [PATCH] service: fix `unload all` * modules/shepherd/service.scm: fix `unload all`
@ 2024-01-10  0:29 zero@fedora
  2024-01-10  0:33 ` [bug#68357] [PATCH] shepherd: service: " zero@fedora
  2024-01-10  1:30 ` zero@fedora
  0 siblings, 2 replies; 6+ messages in thread
From: zero@fedora @ 2024-01-10  0:29 UTC (permalink / raw)
  To: 68357; +Cc: zero@fedora

---
 modules/shepherd/service.scm | 12 +++++-------
 1 file changed, 5 insertions(+), 7 deletions(-)

diff --git a/modules/shepherd/service.scm b/modules/shepherd/service.scm
index 5be78bd..54d3400 100644
--- a/modules/shepherd/service.scm
+++ b/modules/shepherd/service.scm
@@ -1136,11 +1136,6 @@ requests arriving on @var{channel}."
                  (length lst))
            (map service-canonical-name lst))
           (loop registered))))
-      (('unregister-all)                          ;no reply
-       (let ((root (cdr (vhash-assq 'root registered))))
-         (loop (fold (cut vhash-consq <> root <>)
-                     vlist-null
-                     (service-provision root)))))
       (('lookup name reply)
        ;; Look up NAME and return it, or #f, to REPLY.
        (put-message reply
@@ -2638,8 +2633,11 @@ requested to be removed."
   (let ((name (string->symbol service-name)))
     (cond ((eq? name 'all)
            ;; Special 'remove all' case.
-           (put-message (current-registry-channel) `(unregister-all))
-           #t)
+           (unregister-services
+             (filter
+               (lambda (sv)
+                 (not (eq? (service-canonical-name sv) 'root)))
+               (service-list))))
           (else
            ;; Removing only one service.
            (match (lookup-service name)
-- 
2.43.0





^ permalink raw reply related	[flat|nested] 6+ messages in thread

end of thread, other threads:[~2024-01-21 22:24 UTC | newest]

Thread overview: 6+ messages (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
2024-01-10  0:29 [bug#68357] [PATCH] service: fix `unload all` * modules/shepherd/service.scm: fix `unload all` zero@fedora
2024-01-10  0:33 ` [bug#68357] [PATCH] shepherd: service: " zero@fedora
2024-01-10  1:30 ` zero@fedora
2024-01-14 21:33   ` Ludovic Courtès
2024-01-14 22:53     ` ShinyZero0
2024-01-21 22:23       ` bug#68357: " Ludovic Courtès

Code repositories for project(s) associated with this public inbox

	https://git.savannah.gnu.org/cgit/guix.git

This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for read-only IMAP folder(s) and NNTP newsgroup(s).