From baa5bc8bbb50341f337d02d420e2caf49e2f7322 Mon Sep 17 00:00:00 2001
From: sewardj <unknown>
Date: Fri, 12 Nov 1999 14:32:44 +0000
Subject: [PATCH] [project @ 1999-11-12 14:32:44 by sewardj] Install control-c
 signal handler in interpreter() after call to initialize, since that calls
 startupHaskell, which trashes previous signal settings.

---
 ghc/interpreter/hugs.c | 11 ++++++++---
 1 file changed, 8 insertions(+), 3 deletions(-)

diff --git a/ghc/interpreter/hugs.c b/ghc/interpreter/hugs.c
index c8d21328ceed..07a53169517e 100644
--- a/ghc/interpreter/hugs.c
+++ b/ghc/interpreter/hugs.c
@@ -9,8 +9,8 @@
  * included in the distribution.
  *
  * $RCSfile: hugs.c,v $
- * $Revision: 1.17 $
- * $Date: 1999/11/09 00:40:11 $
+ * $Revision: 1.18 $
+ * $Date: 1999/11/12 14:32:44 $
  * ------------------------------------------------------------------------*/
 
 #include <setjmp.h>
@@ -576,7 +576,9 @@ String s; {                             /* return FALSE if none found.     */
             default  : if (strcmp("98",s)==0) {
                            if (heapBuilt() && ((state && !haskell98) ||
                                                (!state && haskell98))) {
-                               FPrintf(stderr,"Haskell 98 compatibility cannot be changed while the interpreter is running\n");
+                               FPrintf(stderr,
+                                       "Haskell 98 compatibility cannot be changed"
+                                       " while the interpreter is running\n");
                            } else {
                                haskell98 = state;
                            }
@@ -1900,6 +1902,9 @@ String argv[]; {
         forHelp();
     }
 
+    /* initialize calls startupHaskell, which trashes our signal handlers */
+    breakOn(TRUE);
+
     for (;;) {
         Command cmd;
         everybody(RESET);               /* reset to sensible initial state */
-- 
GitLab