summaryrefslogtreecommitdiff
path: root/guix
diff options
context:
space:
mode:
authorJohannes Christ <jc@jchri.st>2026-04-22 21:02:10 +0200
committerLudovic Courtès <ludo@gnu.org>2026-04-27 10:03:05 +0200
commit78053b9004a95af5a13f7c02eb47bd66fc126031 (patch)
tree2d86bbd78b4ff35ba9d52aac3cfbae5cdb528930 /guix
parent2ca5575e9dbae6fe5dbbc370aef17492c6732454 (diff)
home: Run child as pid 2.
To test, use a sample home configuration and a command such as: guix home container home.scm -- sleep 10 Before this commit, hitting `^C` would not have any effect, as `sleep` does not explicitly register a signal handler for `SIGINT`. With this commit, `guix home container` forwards the signal to `sleep`, which then exits. * guix/scripts/home.scm (spawn-home-container): Instruct `eval/container` to not run our child directly as pid 1 in the spawned container, as it may not expect to run as an init process. Change-Id: Ib997a0386d0851978d197fbd2dfb139141d13065 Signed-off-by: Ludovic Courtès <ludo@gnu.org> Merges: #8051
Diffstat (limited to 'guix')
-rw-r--r--guix/scripts/home.scm3
1 files changed, 2 insertions, 1 deletions
diff --git a/guix/scripts/home.scm b/guix/scripts/home.scm
index e040800cf3..7499736e66 100644
--- a/guix/scripts/home.scm
+++ b/guix/scripts/home.scm
@@ -372,7 +372,8 @@ immediately. Return the exit status of the process in the container."
(check? #f)))
#:mappings (append network-mappings mappings)
#:guest-uid uid
- #:guest-gid gid))
+ #:guest-gid gid
+ #:child-is-pid1? #f))
;;;