mirror of
https://git.savannah.gnu.org/git/guile.git
synced 2025-06-18 17:50:29 +02:00
don't bother catching SIGSEGV et al in top-repl
* module/ice-9/boot-9.scm (exit-hook): Move up with the other hooks. (top-repl): Don't install handlers for SIGFPE, SIGILL, SIGSEGV, or SIGBUS, as they will have no effect.
This commit is contained in:
parent
049ec20299
commit
c592de96c0
1 changed files with 5 additions and 15 deletions
|
@ -2721,6 +2721,10 @@ module '(ice-9 q) '(make-q q-length))}."
|
||||||
(define before-print-hook (make-hook 1))
|
(define before-print-hook (make-hook 1))
|
||||||
(define after-print-hook (make-hook 1))
|
(define after-print-hook (make-hook 1))
|
||||||
|
|
||||||
|
;;; This hook is run at the very end of an interactive session.
|
||||||
|
;;;
|
||||||
|
(define exit-hook (make-hook))
|
||||||
|
|
||||||
;;; The default repl-reader function. We may override this if we've
|
;;; The default repl-reader function. We may override this if we've
|
||||||
;;; the readline library.
|
;;; the readline library.
|
||||||
(define repl-reader
|
(define repl-reader
|
||||||
|
@ -3357,9 +3361,6 @@ module '(ice-9 q) '(make-q q-length))}."
|
||||||
;; load debugger on demand
|
;; load debugger on demand
|
||||||
(module-autoload! guile-user-module '(system vm debug) '(debug))
|
(module-autoload! guile-user-module '(system vm debug) '(debug))
|
||||||
|
|
||||||
;; Note: SIGFPE, SIGSEGV and SIGBUS are actually "query-only" (see
|
|
||||||
;; scmsigs.c scm_sigaction_for_thread), so the handlers setup here have
|
|
||||||
;; no effect.
|
|
||||||
(let ((old-handlers #f)
|
(let ((old-handlers #f)
|
||||||
;; We can't use @ here, as modules have been booted, but in Guile's
|
;; We can't use @ here, as modules have been booted, but in Guile's
|
||||||
;; build the srfi-1 helper lib hasn't been built yet, which will
|
;; build the srfi-1 helper lib hasn't been built yet, which will
|
||||||
|
@ -3368,15 +3369,8 @@ module '(ice-9 q) '(make-q q-length))}."
|
||||||
(start-repl (module-ref (resolve-module '(system repl repl))
|
(start-repl (module-ref (resolve-module '(system repl repl))
|
||||||
'start-repl))
|
'start-repl))
|
||||||
(signals (if (provided? 'posix)
|
(signals (if (provided? 'posix)
|
||||||
`((,SIGINT . "User interrupt")
|
`((,SIGINT . "User interrupt"))
|
||||||
(,SIGFPE . "Arithmetic error")
|
|
||||||
(,SIGSEGV
|
|
||||||
. "Bad memory access (Segmentation violation)"))
|
|
||||||
'())))
|
'())))
|
||||||
;; no SIGBUS on mingw
|
|
||||||
(if (defined? 'SIGBUS)
|
|
||||||
(set! signals (acons SIGBUS "Bad memory access (bus error)"
|
|
||||||
signals)))
|
|
||||||
|
|
||||||
(dynamic-wind
|
(dynamic-wind
|
||||||
|
|
||||||
|
@ -3413,10 +3407,6 @@ module '(ice-9 q) '(make-q q-length))}."
|
||||||
(cdr old-handler))))
|
(cdr old-handler))))
|
||||||
signals old-handlers))))))
|
signals old-handlers))))))
|
||||||
|
|
||||||
;;; This hook is run at the very end of an interactive session.
|
|
||||||
;;;
|
|
||||||
(define exit-hook (make-hook))
|
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
;;; {Deprecated stuff}
|
;;; {Deprecated stuff}
|
||||||
|
|
Loading…
Add table
Add a link
Reference in a new issue