From 7bc59f3ded1b14f1e205212207649733d70c1942 Mon Sep 17 00:00:00 2001 From: Justin Ethier Date: Thu, 11 Apr 2019 13:21:31 -0400 Subject: [PATCH] Allow (exit) to return integer values to OS --- runtime.c | 4 ++++ 1 file changed, 4 insertions(+) diff --git a/runtime.c b/runtime.c index 38147517..2f13cd5e 100644 --- a/runtime.c +++ b/runtime.c @@ -3122,6 +3122,10 @@ void Cyc_halt(object obj) #if DEBUG_SHOW_DIAG gc_print_stats(Cyc_heap); #endif + if (obj_is_int(obj)) { + exit(obj_obj2int(obj)); + } + exit(0); }