guix-commits
[Top][All Lists]
Advanced

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

01/02: HACK servics: shepherd: Show us where you're hanging [out].


From: guix-commits
Subject: 01/02: HACK servics: shepherd: Show us where you're hanging [out].
Date: Sat, 2 May 2020 06:22:49 -0400 (EDT)

janneke pushed a commit to branch wip-hurd-vm
in repository guix.

commit 996d8492f6e28f83d56656c9db1f4845b70b74cc
Author: Jan (janneke) Nieuwenhuizen <address@hidden>
AuthorDate: Sat May 2 12:20:05 2020 +0200

    HACK servics: shepherd: Show us where you're hanging [out].
    
    * gnu/services/shepherd.scm (shepherd-configuration-file): sprinkle
---
 gnu/services/shepherd.scm | 16 +++++++++++++---
 1 file changed, 13 insertions(+), 3 deletions(-)

diff --git a/gnu/services/shepherd.scm b/gnu/services/shepherd.scm
index 655a45a..6d76cda 100644
--- a/gnu/services/shepherd.scm
+++ b/gnu/services/shepherd.scm
@@ -309,16 +309,26 @@ and return the resulting '.go' file."
           ;; Arrange to spawn a REPL if something goes wrong.  This is better
           ;; than a kernel panic.
           (call-with-error-handling
-            (lambda ()
-              (apply register-services
-                     (map load-compiled '#$(map scm->go files)))))
+           (lambda ()
+             (for-each
+              (lambda (file)
+                (format #t "loading file...~s\n" file)
+                (format (current-error-port) "loading file...~s\n" file)
+                (let ((services (load-compiled file)))
+                  (format #t "register...~s\n" services)
+                  (format (current-error-port) "register...~s\n" services)
+                  (register-services services)))
+              '#$(map scm->go files))))
 
           (format #t "starting services...~%")
+          (format (current-error-port) "starting services...~%")
           (for-each (lambda (service)
                       ;; In the Shepherd 0.3 the 'start' method can raise
                       ;; '&action-runtime-error' if it fails, so protect
                       ;; against it.  (XXX: 'action-runtime-error?' is not
                       ;; exported is 0.3, hence 'service-error?'.)
+                      (format #t "starting service: ~s\n" service)
+                      (format (current-error-port) "starting service: ~s\n" 
service)
                       (guard (c ((service-error? c)
                                  (format (current-error-port)
                                          "failed to start service '~a'~%"



reply via email to

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