From dd951f2cd46fb0dc3075d3feee306c5f6d3dd670 Mon Sep 17 00:00:00 2001 From: sof <unknown> Date: Sat, 3 Jul 1999 18:43:46 +0000 Subject: [PATCH] [project @ 1999-07-03 18:43:46 by sof] exitWith: don't call exit(), but use the RTS' shutdownHaskellAndExit() --- ghc/lib/std/System.lhs | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/ghc/lib/std/System.lhs b/ghc/lib/std/System.lhs index 0b01d5afde83..f61bf9684152 100644 --- a/ghc/lib/std/System.lhs +++ b/ghc/lib/std/System.lhs @@ -5,7 +5,7 @@ \section[System]{Module @System@} \begin{code} -{-# OPTIONS -#include "cbits/stgio.h" #-} +{-# OPTIONS -#include "cbits/stgio.h" -#include "RtsAPI.h" #-} module System ( ExitCode(ExitSuccess,ExitFailure) @@ -142,7 +142,7 @@ exitWith (ExitFailure n) primExit n ioError (IOError Nothing OtherError "exitWith" "exit should not return") -foreign import ccall "libHS_cbits.so" "exit" unsafe primExit :: Int -> IO () +foreign import ccall "shutdownHaskellAndExit" primExit :: Int -> IO () exitFailure :: IO a exitFailure = exitWith (ExitFailure 1) -- GitLab