Move the responsibility for process failure from tasks to the scheduler

When the root task fails the process fails. Failures on other tasks propagate
up the task tree. Failures on non-root tasks without parents just
(theoretically) unwind and disappear.
This commit is contained in:
Brian Anderson
2011-07-14 17:44:39 -07:00
parent 827e300485
commit 4738cf83b0
2 changed files with 3 additions and 3 deletions

View File

@@ -220,8 +220,6 @@ rust_task::fail() {
backtrace();
// Unblock the task so it can unwind.
unblock();
if (this == sched->root_task)
sched->fail();
if (supervisor) {
DLOG(sched, task,
"task %s @0x%" PRIxPTR
@@ -230,7 +228,8 @@ rust_task::fail() {
supervisor->kill();
}
// FIXME: implement unwinding again.
exit(1);
if (this == sched->root_task)
sched->fail();
}
void