From: "zero@fedora" <shinyzero0@tilde.club>
To: 68357@debbugs.gnu.org
Cc: "zero@fedora" <shinyzero0@tilde.club>
Subject: [bug#68357] [PATCH] service: fix `unload all` * modules/shepherd/service.scm: fix `unload all`
Date: Wed, 10 Jan 2024 03:29:22 +0300 [thread overview]
Message-ID: <20240110003016.1761645-2-shinyzero0@tilde.club> (raw)
---
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
next reply other threads:[~2024-01-10 0:32 UTC|newest]
Thread overview: 6+ messages / expand[flat|nested] mbox.gz Atom feed top
2024-01-10 0:29 zero@fedora [this message]
2024-01-10 0:33 ` [bug#68357] [PATCH] shepherd: service: fix `unload all` 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
Reply instructions:
You may reply publicly to this message via plain-text email
using any one of the following methods:
* Save the following mbox file, import it into your mail client,
and reply-to-all from there: mbox
Avoid top-posting and favor interleaved quoting:
https://en.wikipedia.org/wiki/Posting_style#Interleaved_style
* Reply using the --to, --cc, and --in-reply-to
switches of git-send-email(1):
git send-email \
--in-reply-to=20240110003016.1761645-2-shinyzero0@tilde.club \
--to=shinyzero0@tilde.club \
--cc=68357@debbugs.gnu.org \
/path/to/YOUR_REPLY
https://kernel.org/pub/software/scm/git/docs/git-send-email.html
* If your mail client supports setting the In-Reply-To header
via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line
before the message body.
Code repositories for project(s) associated with this external index
https://git.savannah.gnu.org/cgit/guix.git
This is an external index of several public inboxes,
see mirroring instructions on how to clone and mirror
all data and code used by this external index.