summaryrefslogtreecommitdiff
path: root/guix
diff options
context:
space:
mode:
authorJohannes Christ <jc@jchri.st>2026-04-21 22:22:28 +0200
committerLudovic Courtès <ludo@gnu.org>2026-04-27 10:03:04 +0200
commit8538333bed5c9403fb8f626613584e2cf8bf2ea1 (patch)
treed4231ad5e116174d56c07c06b3cf8367ca5fef06 /guix
parentd1d079739b989d1b8430733c46879a6d61626750 (diff)
environment: Run child as PID 2.
* guix/scripts/environment.scm (launch-environment/container): Instruct `call-with-container` to not run the child as PID 1, which sets up a simple signal proxying parent process to properly forward signals such as `SIGINT` to the child. Co-authored-by: Ludovic Courtès <ludo@gnu.org> Change-Id: I8d435357f54b092562b461e0913aa58e63ecdbf9 Fixes: #7600 Signed-off-by: Ludovic Courtès <ludo@gnu.org>
Diffstat (limited to 'guix')
-rw-r--r--guix/scripts/environment.scm6
1 files changed, 6 insertions, 0 deletions
diff --git a/guix/scripts/environment.scm b/guix/scripts/environment.scm
index b2e715c6dd..86c8e31def 100644
--- a/guix/scripts/environment.scm
+++ b/guix/scripts/environment.scm
@@ -1000,6 +1000,12 @@ WHILE-LIST."
;; Call an additional setup procedure, if provided.
(when setup-hook
(setup-hook profile)))
+
+ ;; Do not run the shell as PID 1 since that prevents proper signal
+ ;; handling: per `man 2 kill`, only signals for which the init process
+ ;; has explicitly installed signal handlers can be sent to it.
+ #:child-is-pid1? #f
+
#:guest-uid uid
#:guest-gid gid
#:writable-root? writable-root?