summaryrefslogtreecommitdiff
path: root/gnu
diff options
context:
space:
mode:
authorJohannes Christ <jc@jchri.st>2026-04-22 21:00:12 +0200
committerLudovic Courtès <ludo@gnu.org>2026-04-27 10:03:05 +0200
commit2ca5575e9dbae6fe5dbbc370aef17492c6732454 (patch)
treed653dd17186f589b12e98c2cd6f8b592a67cce19 /gnu
parent8538333bed5c9403fb8f626613584e2cf8bf2ea1 (diff)
linux-container: Add #:child-is-pid1? to ‘eval/container’.
* gnu/system/linux-container.scm (eval/container): Add `#:child-is-pid1?`. Change-Id: I522783f22a38093d862f5cfad1c68baaacd4ecc5 Signed-off-by: Ludovic Courtès <ludo@gnu.org>
Diffstat (limited to 'gnu')
-rw-r--r--gnu/system/linux-container.scm10
1 files changed, 8 insertions, 2 deletions
diff --git a/gnu/system/linux-container.scm b/gnu/system/linux-container.scm
index 1692ccea90d..1db25c170c8 100644
--- a/gnu/system/linux-container.scm
+++ b/gnu/system/linux-container.scm
@@ -356,13 +356,18 @@ Run the container with the given options."))
356 (mappings '()) 356 (mappings '())
357 (mounts '()) 357 (mounts '())
358 (namespaces %namespaces) 358 (namespaces %namespaces)
359 (guest-uid 0) (guest-gid 0)) 359 (guest-uid 0) (guest-gid 0)
360 (child-is-pid1? #t))
360 "Evaluate EXP, a gexp, in a new process executing in separate namespaces as 361 "Evaluate EXP, a gexp, in a new process executing in separate namespaces as
361listed in NAMESPACES. Add MOUNTS, a list of <file-system>, and MAPPINGS, a 362listed in NAMESPACES. Add MOUNTS, a list of <file-system>, and MAPPINGS, a
362list of <file-system-mapping>, to the set of directories visible in the 363list of <file-system-mapping>, to the set of directories visible in the
363process's mount namespace. Inside the namespaces, run code as GUEST-UID and 364process's mount namespace. Inside the namespaces, run code as GUEST-UID and
364GUEST-GID. Return the process' exit status as a monadic value. 365GUEST-GID. Return the process' exit status as a monadic value.
365 366
367When CHILD-IS-PID1? is true, and if NAMESPACES contains 'pid', then the child
368process runs directly as PID 1. See the documentation for
369`(@@ (gnu build linux-container) call-with-container)` for further details.
370
366This is useful to implement processes that, unlike derivations, are not 371This is useful to implement processes that, unlike derivations, are not
367entirely pure and need to access the outside world or to perform side 372entirely pure and need to access the outside world or to perform side
368effects." 373effects."
@@ -406,4 +411,5 @@ effects."
406 #:populate-file-system populate-file-system 411 #:populate-file-system populate-file-system
407 #:namespaces namespaces 412 #:namespaces namespaces
408 #:guest-uid guest-uid 413 #:guest-uid guest-uid
409 #:guest-gid guest-gid)))))) 414 #:guest-gid guest-gid
415 #:child-is-pid1? child-is-pid1?))))))