Fix #2592: do an orderly shutdown when the heap is exhausted
[ghc-hetmet.git] / rts / Main.c
index 434f791..aff3011 100644 (file)
@@ -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;