summaryrefslogtreecommitdiff
path: root/gnu/build/linux-container.scm
diff options
context:
space:
mode:
authorRicardo Wurmus <[email protected]>2019-09-18 11:54:54 +0200
committerRicardo Wurmus <[email protected]>2019-09-18 11:54:54 +0200
commit993a4fbb7c3d1f9977e0789c21905fddd72241fd (patch)
tree899b928672607b9ad74dafd42eb2bfa048a041c4 /gnu/build/linux-container.scm
parent248965c91caf7d10433f090b4712a9b201968416 (diff)
parent7bc46ecc34ceb042ff890e5d306d0a2a736e891d (diff)
Merge remote-tracking branch 'origin/master' into wip-texlive
Diffstat (limited to 'gnu/build/linux-container.scm')
-rw-r--r--gnu/build/linux-container.scm7
1 files changed, 5 insertions, 2 deletions
diff --git a/gnu/build/linux-container.scm b/gnu/build/linux-container.scm
index 6ccb924861..87695c98fd 100644
--- a/gnu/build/linux-container.scm
+++ b/gnu/build/linux-container.scm
@@ -299,8 +299,10 @@ delete it when leaving the dynamic extent of this call."
(false-if-exception (delete-file-recursively tmp-dir))))))
(define* (call-with-container mounts thunk #:key (namespaces %namespaces)
- (host-uids 1) (guest-uid 0) (guest-gid 0))
- "Run THUNK in a new container process and return its exit status.
+ (host-uids 1) (guest-uid 0) (guest-gid 0)
+ (process-spawned-hook (const #t)))
+ "Run THUNK in a new container process and return its exit status; call
+PROCESS-SPAWNED-HOOK with the PID of the new process that has been spawned.
MOUNTS is a list of <file-system> objects that specify file systems to mount
inside the container. NAMESPACES is a list of symbols corresponding to
the identifiers for Linux namespaces: mnt, ipc, uts, pid, user, and net. By
@@ -329,6 +331,7 @@ load path must be adjusted as needed."
(false-if-exception
(kill pid SIGKILL))))
+ (process-spawned-hook pid)
(match (waitpid pid)
((_ . status) status))))))