From 4be00ac12eb12a88abadce5d38a17d53fc9339a9 Mon Sep 17 00:00:00 2001 From: sof Date: Tue, 25 Mar 2003 17:15:07 +0000 Subject: [PATCH] [project @ 2003-03-25 17:15:07 by sof] code wibbles --- ghc/rts/Signals.c | 12 ++++-------- 1 file changed, 4 insertions(+), 8 deletions(-) diff --git a/ghc/rts/Signals.c b/ghc/rts/Signals.c index 899441f..355cf14 100644 --- a/ghc/rts/Signals.c +++ b/ghc/rts/Signals.c @@ -1,5 +1,5 @@ /* ----------------------------------------------------------------------------- - * $Id: Signals.c,v 1.34 2003/02/01 09:10:16 mthomas Exp $ + * $Id: Signals.c,v 1.35 2003/03/25 17:15:07 sof Exp $ * * (c) The GHC Team, 1998-1999 * @@ -79,14 +79,10 @@ more_handlers(I_ sig) return; if (handlers == NULL) - handlers = (StgInt *) malloc((sig + 1) * sizeof(StgInt)); + handlers = (StgInt *)stgMallocBytes((sig + 1) * sizeof(StgInt), "more_handlers"); else - handlers = (StgInt *) realloc(handlers, (sig + 1) * sizeof(StgInt)); + handlers = (StgInt *)stgReallocBytes(handlers, (sig + 1) * sizeof(StgInt), "more_handlers"); - if (handlers == NULL) { - // don't fflush(stdout); WORKAROUND bug in Linux glibc - barf("VM exhausted (in more_handlers)"); - } for(i = nHandlers; i <= sig; i++) // Fill in the new slots with default actions handlers[i] = STG_SIG_DFL; @@ -397,7 +393,7 @@ shutdown_handler(int sig STG_UNUSED) // extreme prejudice. So the first ^C tries to exit the program // cleanly, and the second one just kills it. if (interrupted) { - exit(EXIT_INTERRUPTED); + stg_exit(EXIT_INTERRUPTED); } else { interruptStgRts(); } -- 1.7.10.4