environment: Restore action for SIGPIPE.

Code in `ui.scm' in `initialize-guix' procedure changes the handling of
SIGPIPE to SIG_IGN.  So restore the handling to SIG_DFL so that process
executed will have the usual action.  Technically we should record what the
handling was, and restore it to the previous value, but that would be much
more invasive change.

Always setting it to SIG_DFL is at least less surprising than always setting
to SIG_IGN.

* guix/scripts/environment.scm (launch-environment): Restore default action
for SIGPIPE.

Change-Id: Ifabae1d3e71aa44e63078cea5bd3824b8f61ba14
Signed-off-by: Ludovic Courtès <ludo@gnu.org>
This commit is contained in:
Tomas Volf 2025-05-02 18:58:55 +02:00 committed by Ludovic Courtès
parent 79bc4ebb33
commit a2282c68ff
No known key found for this signature in database
GPG key ID: 090B11993D9AEBB5

View file

@ -506,6 +506,8 @@ cache."
;; Properly handle SIGINT, so pressing C-c in an interactive terminal ;; Properly handle SIGINT, so pressing C-c in an interactive terminal
;; application works. ;; application works.
(sigaction SIGINT SIG_DFL) (sigaction SIGINT SIG_DFL)
;; Restore original action for SIGPIPE.
(sigaction SIGPIPE SIG_DFL)
(load-profile profile manifest (load-profile profile manifest
#:pure? pure? #:white-list-regexps white-list) #:pure? pure? #:white-list-regexps white-list)