[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_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 07532d4), David Thompson, 2015/06/19
- 01/10: build: syscalls: Add clone syscall wrapper., David Thompson, 2015/06/19
- 02/10: build: syscalls: Add setns syscall wrapper., David Thompson, 2015/06/19
- 05/10: fixup container module.,
David Thompson <=
- 04/10: gnu: Add Linux container module., David Thompson, 2015/06/19
- 10/10: scripts: environment: Add --container option., David Thompson, 2015/06/19
- 06/10: gnu: Add Linux container system script., David Thompson, 2015/06/19
- 03/10: build: syscalls: Add additional mount flags., David Thompson, 2015/06/19
- 07/10: gnu: system: Do not activate firmware when activating a container., David Thompson, 2015/06/19
- 09/10: scripts: system: Add 'container' subcommand., David Thompson, 2015/06/19
- 08/10: gnu: system: Add operating-system-derivation/container., David Thompson, 2015/06/19