[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: |
Mon, 22 Jun 2015 01:06:31 +0000 |
davexunit pushed a commit to branch wip-container
in repository guix.
commit eb9067bc869f449404ad01d58a8dec74ee6a3a02
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_NEWIPC
;; CLONE_NEWUSER
CLONE_NEWPID
- CLONE_NEWNET)
+ CLONE_NEWNET
+ SIGCHLD)
;; Map user and group.
;; (call-with-output-file "/proc/self/setgroups"
- branch wip-container created (now bb50fd1), David Thompson, 2015/06/21
- 02/10: build: syscalls: Add setns syscall wrapper., David Thompson, 2015/06/21
- 01/10: build: syscalls: Add clone syscall wrapper., David Thompson, 2015/06/21
- 03/10: build: syscalls: Add additional mount flags., David Thompson, 2015/06/21
- 05/10: fixup container module.,
David Thompson <=
- 04/10: gnu: Add Linux container module., David Thompson, 2015/06/21
- 07/10: gnu: system: Do not activate firmware when activating a container., David Thompson, 2015/06/21
- 06/10: gnu: Add Linux container system script., David Thompson, 2015/06/21
- 08/10: gnu: system: Add operating-system-derivation/container., David Thompson, 2015/06/21
- 09/10: scripts: system: Add 'container' subcommand., David Thompson, 2015/06/21
- 10/10: scripts: environment: Add --container option., David Thompson, 2015/06/21