diff options
| author | Brian Anderson <banderson@mozilla.com> | 2011-07-14 17:44:39 -0700 |
|---|---|---|
| committer | Brian Anderson <banderson@mozilla.com> | 2011-07-14 17:44:39 -0700 |
| commit | 4738cf83b05dc02d1f7a364a6e901a1b5a18da20 (patch) | |
| tree | 8c7abfbaaf8b71fc61c70038f14562bbc82b05b4 /src/rt/rust_task.cpp | |
| parent | 827e3004851ff28f4394bf62d4a9fe29728ebe70 (diff) | |
| download | rust-4738cf83b05dc02d1f7a364a6e901a1b5a18da20.tar.gz rust-4738cf83b05dc02d1f7a364a6e901a1b5a18da20.zip | |
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.
Diffstat (limited to 'src/rt/rust_task.cpp')
| -rw-r--r-- | src/rt/rust_task.cpp | 5 |
1 files changed, 2 insertions, 3 deletions
diff --git a/src/rt/rust_task.cpp b/src/rt/rust_task.cpp index be30f229e7e..fd9a2cc862c 100644 --- a/src/rt/rust_task.cpp +++ b/src/rt/rust_task.cpp @@ -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 |
