summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorsimonmar <unknown>1999-07-14 13:42:28 +0000
committersimonmar <unknown>1999-07-14 13:42:28 +0000
commit5706d07c74e75cb1cf6125f6d758f11264fa04ef (patch)
treec5b58657696a6d2b02347fc662d3a548930f501c
parentcae7e8ce5c4f627277e1c01bcac22b523ede857c (diff)
downloadhaskell-5706d07c74e75cb1cf6125f6d758f11264fa04ef.tar.gz
[project @ 1999-07-14 13:39:46 by simonmar]
Workaround bug in Linux's glibc 2.1: don't fflush(stdout) before writing to stderr.
-rw-r--r--ghc/rts/PrimOps.hc3
-rw-r--r--ghc/rts/Signals.c26
2 files changed, 14 insertions, 15 deletions
diff --git a/ghc/rts/PrimOps.hc b/ghc/rts/PrimOps.hc
index 8d9be51ae4..84ecf27840 100644
--- a/ghc/rts/PrimOps.hc
+++ b/ghc/rts/PrimOps.hc
@@ -1,5 +1,5 @@
/* -----------------------------------------------------------------------------
- * $Id: PrimOps.hc,v 1.27 1999/05/13 17:31:11 simonm Exp $
+ * $Id: PrimOps.hc,v 1.28 1999/07/14 13:42:28 simonmar Exp $
*
* (c) The GHC Team, 1998-1999
*
@@ -867,7 +867,6 @@ FN_(putMVarzh_fast)
mvar = (StgMVar *)R1.p;
if (GET_INFO(mvar) == &FULL_MVAR_info) {
- fflush(stdout);
fprintf(stderr, "putMVar#: MVar already full.\n");
stg_exit(EXIT_FAILURE);
}
diff --git a/ghc/rts/Signals.c b/ghc/rts/Signals.c
index 0953c3c85c..7214cb45d8 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