[bug#33466,1/2] repl: Do not exit repl on SIGINT.

Message ID 20181122144228.31573-1-go.wigust@gmail.com
State Accepted
Commit 3133d678a8e13aee1c432272e6fd82bc57f6e95e
Headers show
Series Improve guix repl | expand

Checks

Context Check Description
cbaines/applying patch success Successfully applied
cbaines/applying patch success Successfully applied

Commit Message

Oleg Pykhalov Nov. 22, 2018, 2:42 p.m. UTC
* guix/scripts/repl.scm (guix-repl): Do not exit repl on SIGINT.
---
 guix/scripts/repl.scm | 5 ++++-
 1 file changed, 4 insertions(+), 1 deletion(-)

Comments

Ludovic Courtès Nov. 25, 2018, 8:39 p.m. UTC | #1
Hi Oleg,

Oleg Pykhalov <go.wigust@gmail.com> skribis:

> * guix/scripts/repl.scm (guix-repl): Do not exit repl on SIGINT.

LGTM, thanks!

Ludo'.

Patch

diff --git a/guix/scripts/repl.scm b/guix/scripts/repl.scm
index b157833a4..1a105f51e 100644
--- a/guix/scripts/repl.scm
+++ b/guix/scripts/repl.scm
@@ -188,7 +188,10 @@  call THUNK."
              (save-module-excursion
               (lambda ()
                 (set-current-module user-module)
-                (start-repl))))
+                ;; Do not exit repl on SIGINT.
+                ((@@ (ice-9 top-repl) call-with-sigint)
+                 (lambda ()
+                   (start-repl))))))
             ((machine)
              (machine-repl))
             (else