Commit 12cfec94 authored by Simon Marlow's avatar Simon Marlow
Browse files

fix bug in discardTasksExcept() that broke forkProcess

parent ce7bf183
......@@ -280,11 +280,12 @@ boundTaskExiting (Task *task)
discardTasksExcept (Task *keep)
Task *task;
Task *task, *next;
// Wipe the task list, except the current Task.
for (task = all_tasks; task != NULL; task=task->all_link) {
for (task = all_tasks; task != NULL; task=next) {
next = task->all_link;
if (task != keep) {
debugTrace(DEBUG_sched, "discarding task %ld", (long)TASK_ID(task));
Supports Markdown
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