Skip to content
Snippets Groups Projects
Commit 607cf43e authored by David J. Bremer's avatar David J. Bremer
Browse files

If a message comes in twice saying a given task exited, print an

error instead of doing an assertion failure.
parent efb841af
No related branches found
No related tags found
No related merge requests found
......@@ -124,15 +124,23 @@ void task_state_update (task_state_t ts, int taskid, task_state_type_t t)
bit_set (ts->start_failed, taskid);
break;
case TS_NORMAL_EXIT:
bit_set (ts->normal_exit, taskid);
bit_clear (ts->running, taskid);
ts->n_exited++;
if (bit_test(ts->normal_exit, taskid)) {
error("Task %d reported exit for a second time.");
} else {
bit_set (ts->normal_exit, taskid);
ts->n_exited++;
}
break;
case TS_ABNORMAL_EXIT:
bit_clear (ts->running, taskid);
bit_set (ts->abnormal_exit, taskid);
ts->n_exited++;
ts->n_abnormal++;
if (bit_test(ts->abnormal_exit, taskid)) {
error("Task %d reported exit for a second time.");
} else {
bit_set (ts->abnormal_exit, taskid);
ts->n_exited++;
ts->n_abnormal++;
}
break;
}
......
0% Loading or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment