aboutsummaryrefslogtreecommitdiff
path: root/gnu
diff options
context:
space:
mode:
Diffstat (limited to 'gnu')
-rw-r--r--gnu/build/linux-container.scm21
1 files changed, 12 insertions, 9 deletions
diff --git a/gnu/build/linux-container.scm b/gnu/build/linux-container.scm
index ec68679f0b..562d50bcc7 100644
--- a/gnu/build/linux-container.scm
+++ b/gnu/build/linux-container.scm
@@ -214,15 +214,18 @@ host user identifiers to map into the user namespace."
(lambda ()
(close out)
;; Wait for parent to set things up.
- (read in)
- (close in)
- (purify-environment)
- (when (memq 'mnt namespaces)
- (mount-file-systems root mounts
- #:mount-/proc? (memq 'pid namespaces)
- #:mount-/sys? (memq 'net namespaces)))
- ;; TODO: Manage capabilities.
- (thunk))))
+ (match (read in)
+ ('ready
+ (close in)
+ (purify-environment)
+ (when (memq 'mnt namespaces)
+ (mount-file-systems root mounts
+ #:mount-/proc? (memq 'pid namespaces)
+ #:mount-/sys? (memq 'net namespaces)))
+ ;; TODO: Manage capabilities.
+ (thunk))
+ (_ ;parent died or something
+ (primitive-exit 2))))))
(pid
(when (memq 'user namespaces)
(initialize-user-namespace pid host-uids))