mirror of
https://git.in.rschanz.org/ryan77627/guix.git
synced 2024-12-24 21:38:07 -05:00
gnu: smlnj: Fix use of Ctrl-c in sml REPL.
* gnu/packages/sml.scm (smlnj): Replace INVOKE with SYSTEM which has more favourable signal dispositions. Signed-off-by: Tobias Geerinckx-Rice <me@tobias.gr>
This commit is contained in:
parent
ed15c92139
commit
62da327848
1 changed files with 16 additions and 4 deletions
|
@ -175,10 +175,22 @@ (define-public smlnj
|
||||||
"sml.boot.amd64-unix/SMLNJ-BASIS/.cm/amd64-unix/basis-common.cm"))
|
"sml.boot.amd64-unix/SMLNJ-BASIS/.cm/amd64-unix/basis-common.cm"))
|
||||||
|
|
||||||
;; Build.
|
;; Build.
|
||||||
(invoke "./config/install.sh" "-default"
|
;; The `sml` executable built by this package somehow inherits the
|
||||||
(if (string=? "i686-linux" ,(%current-system))
|
;; signal dispositions of the shell where it was built. If SIGINT
|
||||||
"32"
|
;; is ignored in the shell, the resulting `sml` will also ignore
|
||||||
"64"))
|
;; SIGINT. This will break the use of Ctrl-c for interrupting
|
||||||
|
;; execution in the SML/NJ REPL.
|
||||||
|
;; Here, we use Guile's `system` procedure instead of Guix's
|
||||||
|
;; `invoke` because `invoke` uses Guile's `system*`, which causes
|
||||||
|
;; SIGINT and SIGQUIT to be ignored.
|
||||||
|
(let ((exit-code
|
||||||
|
(system (string-append "./config/install.sh -default "
|
||||||
|
(if (string=? "i686-linux"
|
||||||
|
,(%current-system))
|
||||||
|
"32"
|
||||||
|
"64")))))
|
||||||
|
(unless (zero? exit-code)
|
||||||
|
(error (format #f "Exit code: ~a" exit-code))))
|
||||||
|
|
||||||
;; Undo the binary patch.
|
;; Undo the binary patch.
|
||||||
(for-each
|
(for-each
|
||||||
|
|
Loading…
Reference in a new issue