From 1eafc7a36fd081d74d444a17afcc8997f4e88410 Mon Sep 17 00:00:00 2001 From: Matt Birkholz Date: Fri, 3 Feb 2017 16:56:48 -0700 Subject: [PATCH] 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. --- src/runtime/gc.scm | 10 +++++++--- 1 file changed, 7 insertions(+), 3 deletions(-) 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?) -- 2.25.1