guix-commits
[Top][All Lists]
Advanced

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

02/04: build: shepherd: Use autoload to lazily bind Shepherd modules.


From: guix-commits
Subject: 02/04: build: shepherd: Use autoload to lazily bind Shepherd modules.
Date: Mon, 2 Aug 2021 14:20:50 -0400 (EDT)

apteryx pushed a commit to branch master
in repository guix.

commit 5b2b834269f74865c8ca6ab5e81f6834228490d4
Author: Maxim Cournoyer <maxim.cournoyer@gmail.com>
AuthorDate: Tue Jul 27 23:24:23 2021 -0400

    build: shepherd: Use autoload to lazily bind Shepherd modules.
    
    Instead of imperative module-autoload! directives.
    
    * gnu/build/shepherd.scm: Replace module-autoload! directives by autoload
    arguments for define-module.
---
 gnu/build/shepherd.scm | 14 ++++++--------
 1 file changed, 6 insertions(+), 8 deletions(-)

diff --git a/gnu/build/shepherd.scm b/gnu/build/shepherd.scm
index d7b858d..778e3fc 100644
--- a/gnu/build/shepherd.scm
+++ b/gnu/build/shepherd.scm
@@ -24,6 +24,12 @@
   #:use-module (srfi srfi-1)
   #:use-module (srfi srfi-26)
   #:use-module (ice-9 match)
+  ;; XXX: Lazy-bind the Shepherd to avoid a compile-time dependency.
+  #:autoload (shepherd service) (fork+exec-command
+                                 read-pid-file
+                                 exec-command
+                                 %precious-signals)
+  #:autoload (shepherd system) (unblock-signals)
   #:export (make-forkexec-constructor/container
             fork+exec-command/container))
 
@@ -92,14 +98,6 @@
                            (file-exists? (file-system-mapping-source mapping)))
                          mappings)))))
 
-;; XXX: Lazy-bind the Shepherd to avoid a compile-time dependency.
-(module-autoload! (current-module)
-                  '(shepherd service)
-                  '(fork+exec-command read-pid-file exec-command
-                    %precious-signals))
-(module-autoload! (current-module)
-                  '(shepherd system) '(unblock-signals))
-
 (define* (read-pid-file/container pid pid-file #:key (max-delay 5))
   "Read PID-FILE in the container namespaces of PID, which exists in a
 separate mount and PID name space.  Return the \"outer\" PID. "



reply via email to

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