Install handler in CALL-TERMINALLY so scsh with exit with status 1 in case of an error.

This commit is contained in:
mainzelm 2004-03-11 09:54:33 +00:00
parent bcbd16ff0a
commit 622ef7a99f
2 changed files with 10 additions and 4 deletions

View File

@ -232,6 +232,7 @@
general-tables
simple-syntax
exit-hooks
display-conditions
scsh-endian)
(for-syntax (open scsh-syntax-helpers scheme))

View File

@ -10,10 +10,15 @@
(with-continuation
null-continuation
(lambda ()
(dynamic-wind
(lambda () (values))
thunk
(lambda () (exit 0))))))
(with-handler
(lambda (c more)
(display-condition c (current-error-port))
(exit 1))
(lambda ()
(dynamic-wind
(lambda () (values))
thunk
(lambda () (exit 0))))))))
;; from shift-reset.scm:
(define null-continuation #f)