Install handler in CALL-TERMINALLY so scsh with exit with status 1 in case of an error.
This commit is contained in:
parent
bcbd16ff0a
commit
622ef7a99f
|
@ -232,6 +232,7 @@
|
|||
general-tables
|
||||
simple-syntax
|
||||
exit-hooks
|
||||
display-conditions
|
||||
|
||||
scsh-endian)
|
||||
(for-syntax (open scsh-syntax-helpers scheme))
|
||||
|
|
|
@ -9,11 +9,16 @@
|
|||
(define (call-terminally thunk)
|
||||
(with-continuation
|
||||
null-continuation
|
||||
(lambda ()
|
||||
(with-handler
|
||||
(lambda (c more)
|
||||
(display-condition c (current-error-port))
|
||||
(exit 1))
|
||||
(lambda ()
|
||||
(dynamic-wind
|
||||
(lambda () (values))
|
||||
thunk
|
||||
(lambda () (exit 0))))))
|
||||
(lambda () (exit 0))))))))
|
||||
|
||||
;; from shift-reset.scm:
|
||||
(define null-continuation #f)
|
||||
|
|
Loading…
Reference in New Issue