about summary refs log tree commit diff
path: root/src/rt/rust_task.cpp
diff options
context:
space:
mode:
Diffstat (limited to 'src/rt/rust_task.cpp')
-rw-r--r--src/rt/rust_task.cpp5
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