emacs-bug-tracker
[Top][All Lists]
Advanced

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

bug#68357: closed ([PATCH] service: fix `unload all` * modules/shepherd/


From: GNU bug Tracking System
Subject: bug#68357: closed ([PATCH] service: fix `unload all` * modules/shepherd/service.scm: fix `unload all`)
Date: Sun, 21 Jan 2024 22:24:01 +0000

Your message dated Sun, 21 Jan 2024 23:23:03 +0100
with message-id <87il3m8gxk.fsf@gnu.org>
and subject line Re: [bug#68357] [PATCH] shepherd: service: fix `unload all`
has caused the debbugs.gnu.org bug report #68357,
regarding [PATCH] service: fix `unload all` * modules/shepherd/service.scm: fix 
`unload all`
to be marked as done.

(If you believe you have received this mail in error, please contact
help-debbugs@gnu.org.)


-- 
68357: https://debbugs.gnu.org/cgi/bugreport.cgi?bug=68357
GNU Bug Tracking System
Contact help-debbugs@gnu.org with problems
--- Begin Message --- Subject: [PATCH] service: fix `unload all` * modules/shepherd/service.scm: fix `unload all` Date: Wed, 10 Jan 2024 03:29:22 +0300
---
 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




--- End Message ---
--- Begin Message --- Subject: Re: [bug#68357] [PATCH] shepherd: service: fix `unload all` Date: Sun, 21 Jan 2024 23:23:03 +0100 User-agent: Gnus/5.13 (Gnus v5.13)
Hi!

"ShinyZero0" <shinyzero0@tilde.club> skribis:

> Yes, that was the problem. `herd reload root all` was leaving the
> processes running and many of them crashed or had strange behaviour
> after loading, so one had to kill them manually and then restart 
> the services.
>
> Of course `herd unload root all` was the same.
>
> Best wishes, Paul.

Thanks for clarifying.  I pushed something similar along with a test as
commit b7fcdad75dff73fb4a8f531d0834eb9a965bcfd6.

Ludo’.


--- End Message ---

reply via email to

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