X-Git-Url: http://git.megacz.com/?a=blobdiff_plain;f=ghc%2Frts%2FSignals.c;h=7214cb45d8deb78ab04cdf67e9ef9acdf0fd73b2;hb=5706d07c74e75cb1cf6125f6d758f11264fa04ef;hp=0953c3c85c3e8ab767865cef8d830d603b9fa620;hpb=cae7e8ce5c4f627277e1c01bcac22b523ede857c;p=ghc-hetmet.git diff --git a/ghc/rts/Signals.c b/ghc/rts/Signals.c index 0953c3c..7214cb4 100644 --- a/ghc/rts/Signals.c +++ b/ghc/rts/Signals.c @@ -1,5 +1,5 @@ /* ----------------------------------------------------------------------------- - * $Id: Signals.c,v 1.6 1999/06/25 09:16:46 simonmar Exp $ + * $Id: Signals.c,v 1.7 1999/07/14 13:39:46 simonmar Exp $ * * (c) The GHC Team, 1998-1999 * @@ -39,21 +39,21 @@ more_handlers(I_ sig) I_ i; if (sig < nHandlers) - return; + return; if (handlers == NULL) - handlers = (I_ *) malloc((sig + 1) * sizeof(I_)); + handlers = (I_ *) malloc((sig + 1) * sizeof(I_)); else - handlers = (I_ *) realloc(handlers, (sig + 1) * sizeof(I_)); + handlers = (I_ *) realloc(handlers, (sig + 1) * sizeof(I_)); if (handlers == NULL) { - fflush(stdout); - fprintf(stderr, "VM exhausted (in more_handlers)\n"); - exit(EXIT_FAILURE); + /* don't fflush(stdout); WORKAROUND bug in Linux glibc */ + fprintf(stderr, "VM exhausted (in more_handlers)\n"); + exit(EXIT_FAILURE); } for(i = nHandlers; i <= sig; i++) - /* Fill in the new slots with default actions */ - handlers[i] = STG_SIG_DFL; + /* Fill in the new slots with default actions */ + handlers[i] = STG_SIG_DFL; nHandlers = sig + 1; } @@ -233,10 +233,10 @@ start_signal_handlers(void) StgInt sig_install(StgInt sig, StgInt spi, StgStablePtr handler, sigset_t *mask) { - fflush(stdout); - fprintf(stderr, - "No signal handling support in a parallel implementation.\n"); - exit(EXIT_FAILURE); + /* don't fflush(stdout); WORKAROUND bug in Linux glibc */ + fprintf(stderr, + "No signal handling support in a parallel implementation.\n"); + exit(EXIT_FAILURE); } void