diff options
author | Maxim Cournoyer <maxim.cournoyer@gmail.com> | 2021-07-27 23:24:23 -0400 |
---|---|---|
committer | Maxim Cournoyer <maxim.cournoyer@gmail.com> | 2021-08-02 14:16:22 -0400 |
commit | 5b2b834269f74865c8ca6ab5e81f6834228490d4 (patch) | |
tree | 0dff30a40c9a29da2a621f835100495e2ead09a5 /gnu/build/shepherd.scm | |
parent | 6b9bebbb3d4210f2efe8e40bc83bcf60ec673512 (diff) |
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.
Diffstat (limited to 'gnu/build/shepherd.scm')
-rw-r--r-- | gnu/build/shepherd.scm | 14 |
1 files changed, 6 insertions, 8 deletions
diff --git a/gnu/build/shepherd.scm b/gnu/build/shepherd.scm index d7b858dea4..778e3fc627 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. " |