unofficial mirror of guix-patches@gnu.org 
 help / color / mirror / code / Atom feed
From: "Ludovic Courtès" <ludo@gnu.org>
To: "zero@fedora" <shinyzero0@tilde.club>
Cc: 68357@debbugs.gnu.org
Subject: [bug#68357] [PATCH] shepherd: service: fix `unload all`
Date: Sun, 14 Jan 2024 22:33:18 +0100	[thread overview]
Message-ID: <87v87vfvmp.fsf@gnu.org> (raw)
In-Reply-To: <20240110013058.1822277-2-shinyzero0@tilde.club> (shinyzero0@tilde.club's message of "Wed, 10 Jan 2024 04:30:59 +0300")

Hi,

"zero@fedora" <shinyzero0@tilde.club> skribis:

> * modules/shepherd/service.scm: fix `unload all`

Thanks for the patch!

> -      (('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))))

Do I get it right that the problem with the current implementation is
that services are removed from the registry but not actually stopped?

Ludo’.





  reply	other threads:[~2024-01-14 21:34 UTC|newest]

Thread overview: 6+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
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 [this message]
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

  List information: https://guix.gnu.org/

* Reply using the --to, --cc, and --in-reply-to
  switches of git-send-email(1):

  git send-email \
    --in-reply-to=87v87vfvmp.fsf@gnu.org \
    --to=ludo@gnu.org \
    --cc=68357@debbugs.gnu.org \
    --cc=shinyzero0@tilde.club \
    /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 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).