cxx: notify parent on abort() (in main thread)

Fixes #1605
This commit is contained in:
Emery Hemingway 2015-06-29 10:26:30 -05:00 committed by Christian Helmuth
parent e131235521
commit 46b7227ef0

View File

@ -110,6 +110,10 @@ extern "C" void *abort(void)
myself->name(thread_name, sizeof(thread_name));
PWRN("abort called - thread: '%s'", thread_name);
/* Notify the parent of failure */
if (!strcmp("main", thread_name, sizeof(thread_name)))
env()->parent()->exit(1);
sleep_forever();
return 0;
}