GNU bug report logs - #76282
Signal handling (like SIGINT) and guix shell --container: PID 1

Previous Next

Package: guix;

Reported by: ingar <at> onionmail.info

Date: Fri, 14 Feb 2025 09:59:01 UTC

Severity: normal

Full log


View this message in rfc822 format

From: Tomas Volf <~@wolfsden.cz>
To: Ludovic Courtès <ludo <at> gnu.org>
Cc: ingar <at> onionmail.info, 76282 <at> debbugs.gnu.org, Maxim Cournoyer <maxim.cournoyer <at> gmail.com>
Subject: bug#76282: Signal handling (like SIGINT) and guix shell --container: PID 1
Date: Mon, 02 Jun 2025 21:24:17 +0200
Ludovic Courtès <ludo <at> gnu.org> writes:

> I didn’t follow closely but how about this:
>
> diff --git a/guix/scripts/environment.scm b/guix/scripts/environment.scm
> index 1c2d222c748..43cfffbd9cb 100644
> --- a/guix/scripts/environment.scm
> +++ b/guix/scripts/environment.scm
> @@ -980,6 +980,11 @@ (define* (launch-environment/container #:key command bash user user-mappings
>              ;; 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 (?).
> +          #:child-is-pid1? #f
> +
>            #:guest-uid uid
>            #:guest-gid gid
>            #:writable-root? writable-root?

Seems to fix the issue for me, nice.

Reviewed-by: Tomas Volf <~@wolfsden.cz>

Tomas

-- 
There are only two hard things in Computer Science:
cache invalidation, naming things and off-by-one errors.




This bug report was last modified 13 days ago.

Previous Next


GNU bug tracking system
Copyright (C) 1999 Darren O. Benham, 1997,2003 nCipher Corporation Ltd, 1994-97 Ian Jackson.