[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]
05/05: shepherd: 'fork+exec-command/container' always returns a PID.
From: |
guix-commits |
Subject: |
05/05: shepherd: 'fork+exec-command/container' always returns a PID. |
Date: |
Sun, 10 Apr 2022 18:26:46 -0400 (EDT) |
civodul pushed a commit to branch master
in repository guix.
commit f42959662765d1cd47137ff5da09086fc6a62e99
Author: Ludovic Courtès <ludo@gnu.org>
AuthorDate: Sun Apr 10 23:48:03 2022 +0200
shepherd: 'fork+exec-command/container' always returns a PID.
Fixes a regression introduced in
938448bf40fc77092859352d2243e2d0c236375f whereby
'fork+exec-command/container' would return #t, then used as the running
value of the 'guix-daemon' service in the installer. Upon installation
completion, stopping the 'guix-daemon' service would fail with
wrong-type-arg because that #t would be passed to the 'stop' method in
lieu of a PID.
* gnu/build/shepherd.scm (fork+exec-command/container): Return a PID
rather than #t.
---
gnu/build/shepherd.scm | 2 +-
1 file changed, 1 insertion(+), 1 deletion(-)
diff --git a/gnu/build/shepherd.scm b/gnu/build/shepherd.scm
index 474054f645..595db40f2e 100644
--- a/gnu/build/shepherd.scm
+++ b/gnu/build/shepherd.scm
@@ -240,7 +240,7 @@ on Hurd systems for instance, fallback to direct forking."
(apply exec-command* command (strip-pid args)))
(lambda ()
(primitive-_exit 127))))
- (pid #t))))
+ (pid pid)))) ;XXX: assuming the same PID namespace
(apply fork+exec-command command (strip-pid args)))))
;; Local Variables: