[Top][All Lists]

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

05/10: fixup container module.

From: David Thompson
Subject: 05/10: fixup container module.
Date: Fri, 19 Jun 2015 13:00:28 +0000

davexunit pushed a commit to branch wip-container
in repository guix.

commit c552736ac1872cc1b51ee136703da33787421372
Author: David Thompson <address@hidden>
Date:   Fri Jun 19 08:57:02 2015 -0400

    fixup container module.
 gnu/build/linux-container.scm |   10 ++++++----
 1 files changed, 6 insertions(+), 4 deletions(-)

diff --git a/gnu/build/linux-container.scm b/gnu/build/linux-container.scm
index 12f0acc..fe7bc47 100644
--- a/gnu/build/linux-container.scm
+++ b/gnu/build/linux-container.scm
@@ -24,11 +24,12 @@
   #:export (call-with-container))
 (define (call-with-clone namespaces thunk)
-  "Run THUNK in a separate process with a set of NAMESPACES
-disassociated from the current process."
+  "Run THUNK in a separate process with a set of NAMESPACES disassociated from
+the current process.  The parent process blocks until the container process
+has terminated."
   (match (clone (apply logior namespaces))
     (0 (thunk))
-    (pid pid)))
+    (pid (waitpid pid))))
 (define-syntax-rule (with-clone namespaces body ...)
   "Evaluate BODY in a new process with the specified new NAMESPACES."
@@ -65,7 +66,8 @@ be bind mounted within the container."
                       ;; CLONE_NEWUSER
-                      CLONE_NEWNET)
+                      CLONE_NEWNET
+                      SIGCHLD)
       ;; Map user and group.
       ;; (call-with-output-file "/proc/self/setgroups"

reply via email to

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