diff options
author | Simon Marlow <marlowsd@gmail.com> | 2008-12-09 10:59:19 +0000 |
---|---|---|
committer | Simon Marlow <marlowsd@gmail.com> | 2008-12-09 10:59:19 +0000 |
commit | 5a5acb3698aa4ffdd738c301fa722afe12a1f3de (patch) | |
tree | ce83c8c73753a70b85b2409745b7498e00555559 /rts/Main.c | |
parent | 31d797eb1b3c5aa07f928b58402529fd35b71bcc (diff) | |
download | haskell-5a5acb3698aa4ffdd738c301fa722afe12a1f3de.tar.gz |
Fix #2592: do an orderly shutdown when the heap is exhausted
Really we should be raising an exception in this case, but that's
tricky (see comments). At least now we shut down the runtime
correctly rather than just exiting.
Diffstat (limited to 'rts/Main.c')
-rw-r--r-- | rts/Main.c | 3 |
1 files changed, 3 insertions, 0 deletions
diff --git a/rts/Main.c b/rts/Main.c index 434f79156b..aff3011e36 100644 --- a/rts/Main.c +++ b/rts/Main.c @@ -126,6 +126,9 @@ static void real_main(void) errorBelch("interrupted"); exit_status = EXIT_INTERRUPTED; break; + case HeapExhausted: + exit_status = EXIT_HEAPOVERFLOW; + break; case Success: exit_status = EXIT_SUCCESS; break; |