Commit 657dfc15 authored by simonmar's avatar simonmar

[project @ 2000-08-23 12:51:03 by simonmar]

Fix a problem where ^C wasn't recognised while waiting for I/O.
parent 46af8a7c
/* ---------------------------------------------------------------------------
* $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
*
......@@ -514,7 +514,9 @@ schedule( void )
#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
*
......@@ -171,6 +171,12 @@ awaitEvent(rtsBool wait)
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.
*/
......@@ -270,6 +276,6 @@ awaitEvent(rtsBool wait)
blocked_queue_tl = prev;
}
} while (wait && run_queue_hd == END_TSO_QUEUE);
} while (wait && !interrupted && run_queue_hd == END_TSO_QUEUE);
#endif
}
Markdown is supported
0% or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment