aboutsummaryrefslogtreecommitdiff
path: root/gnu/build
diff options
context:
space:
mode:
authorLudovic Courtès <ludo@gnu.org>2019-09-17 16:17:20 +0200
committerLudovic Courtès <ludo@gnu.org>2019-09-17 16:27:15 +0200
commit9ff87bb99614923fa3336ab4bbf22e3444709b48 (patch)
treefa169a6cc0fdc8d92bb4c4a4f265afc2ba29a890 /gnu/build
parentae71bef532d6b1c9d1481a3ac65827f148b1e45b (diff)
parent9e8e252026f558933bdd9cfc26a75d13954b3e8e (diff)
downloadguix-9ff87bb99614923fa3336ab4bbf22e3444709b48.tar
guix-9ff87bb99614923fa3336ab4bbf22e3444709b48.tar.gz
Merge branch 'master' into core-updates
Diffstat (limited to 'gnu/build')
-rw-r--r--gnu/build/linux-container.scm7
-rw-r--r--gnu/build/shepherd.scm8
2 files changed, 6 insertions, 9 deletions
diff --git a/gnu/build/linux-container.scm b/gnu/build/linux-container.scm
index 6ccb924861..87695c98fd 100644
--- a/gnu/build/linux-container.scm
+++ b/gnu/build/linux-container.scm
@@ -299,8 +299,10 @@ delete it when leaving the dynamic extent of this call."
(false-if-exception (delete-file-recursively tmp-dir))))))
(define* (call-with-container mounts thunk #:key (namespaces %namespaces)
- (host-uids 1) (guest-uid 0) (guest-gid 0))
- "Run THUNK in a new container process and return its exit status.
+ (host-uids 1) (guest-uid 0) (guest-gid 0)
+ (process-spawned-hook (const #t)))
+ "Run THUNK in a new container process and return its exit status; call
+PROCESS-SPAWNED-HOOK with the PID of the new process that has been spawned.
MOUNTS is a list of <file-system> objects that specify file systems to mount
inside the container. NAMESPACES is a list of symbols corresponding to
the identifiers for Linux namespaces: mnt, ipc, uts, pid, user, and net. By
@@ -329,6 +331,7 @@ load path must be adjusted as needed."
(false-if-exception
(kill pid SIGKILL))))
+ (process-spawned-hook pid)
(match (waitpid pid)
((_ . status) status))))))
diff --git a/gnu/build/shepherd.scm b/gnu/build/shepherd.scm
index cf68f2108b..b32765ed5e 100644
--- a/gnu/build/shepherd.scm
+++ b/gnu/build/shepherd.scm
@@ -67,16 +67,10 @@
(file-system-mapping
(source "/etc/group") (target source))))
- (define nscd-socket
- (file-system-mapping
- (source "/var/run/nscd") (target source)
- (writable? #t)))
-
(append (cons (tmpfs "/tmp") %container-file-systems)
(let ((mappings `(,@(if (memq 'net namespaces)
'()
- (cons nscd-socket
- %network-file-mappings))
+ %network-file-mappings)
,@(if (and (memq 'mnt namespaces)
(not (memq 'user namespaces)))
accounts