Fix a problem where ^C wasn't recognised while waiting for I/O.
/* ---------------------------------------------------------------------------
- * $Id: Schedule.c,v 1.76 2000/08/15 14:18:43 simonmar Exp $
+ * $Id: Schedule.c,v 1.77 2000/08/23 12:51:03 simonmar Exp $
*
* (c) The GHC Team, 1998-2000
*
#endif
);
}
-
+ /* we can be interrupted while waiting for I/O... */
+ if (interrupted) continue;
+
/* check for signals each time around the scheduler */
#ifndef mingw32_TARGET_OS
if (signals_pending()) {
/* -----------------------------------------------------------------------------
- * $Id: Select.c,v 1.12 2000/04/03 15:24:21 rrt Exp $
+ * $Id: Select.c,v 1.13 2000/08/23 12:51:03 simonmar Exp $
*
* (c) The GHC Team 1995-1999
*
break;
}
+ if (interrupted) {
+ RELEASE_LOCK(&sched_mutex);
+ select_succeeded = rtsFalse;
+ break;
+ }
+
/* If new runnable threads have arrived, stop waiting for
* I/O and run them.
*/
blocked_queue_tl = prev;
}
- } while (wait && run_queue_hd == END_TSO_QUEUE);
+ } while (wait && !interrupted && run_queue_hd == END_TSO_QUEUE);
#endif
}