From: Matt Birkholz Date: Fri, 3 Feb 2017 23:56:48 +0000 (-0700) Subject: Exit with non-zero status when Aborting!: out of memory... X-Git-Tag: mit-scheme-pucked-9.2.12~227^2~3 X-Git-Url: https://birchwood-abbey.net/git?a=commitdiff_plain;h=1eafc7a36fd081d74d444a17afcc8997f4e88410;p=mit-scheme.git Exit with non-zero status when Aborting!: out of memory... ...in --batch-mode. This is basically 93d3d5c, which was mistakenly undone by 85c1fb4 because it assumed the abort resulted in an error that would stop the REPL. Signaling an error after the restart and cleanup is... tricky... so just %exit. --- diff --git a/src/runtime/gc.scm b/src/runtime/gc.scm index 0d7c072ab..f3bba52e6 100644 --- a/src/runtime/gc.scm +++ b/src/runtime/gc.scm @@ -134,9 +134,13 @@ USA. (cmdl-message/strings "Aborting!: out of memory") ;; Clean up whatever possible to avoid a reoccurrence. (cmdl-message/active - (lambda (port) - port - (with-gc-notification! #t gc-clean))))))) + (if (nearest-cmdl/batch-mode?) + (lambda (port) + (newline port) + (%exit 1)) + (lambda (port) + port + (with-gc-notification! #t gc-clean)))))))) (define gc-boot-loading?)