davexunit pushed a commit to branch wip-container in repository guix. commit eb9067bc869f449404ad01d58a8dec74ee6a3a02 Author: David Thompson <da...@gnu.org> 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_NEWIPC ;; CLONE_NEWUSER CLONE_NEWPID - CLONE_NEWNET) + CLONE_NEWNET + SIGCHLD) ;; Map user and group. ;; (call-with-output-file "/proc/self/setgroups"