diff --git a/scsh/scsh-package.scm b/scsh/scsh-package.scm index be27ddd..4811301 100644 --- a/scsh/scsh-package.scm +++ b/scsh/scsh-package.scm @@ -316,6 +316,7 @@ ; with-current-output-port exit scsh-level-0-internals ; set-command-line-args! init-scsh-vars threads + root-scheduler ; scheme-exit-now scheme) (files top meta-arg)) diff --git a/scsh/top.scm b/scsh/top.scm index 1a73807..e444401 100644 --- a/scsh/top.scm +++ b/scsh/top.scm @@ -275,18 +275,17 @@ (in-package (user-environment) '()))))) ((eq? term-switch 'c) - (eval (read-exactly-one-sexp-from-string term-val) - (interaction-environment)) - (exit 0)) + (scheme-exit-now + (eval (read-exactly-one-sexp-from-string term-val) + (interaction-environment)))) ) (top-entry ; There was a -e . - ((eval top-entry (interaction-environment)) - (command-line)) - (exit 0)) + (scheme-exit-now ((eval top-entry (interaction-environment)) + (command-line)))) ;; Otherwise, the script executed as it loaded, ;; so we're done. - (else (exit 0))))))))))))) + (else (scheme-exit-now 0))))))))))))