mirror of
https://github.com/RGBCube/serenity
synced 2025-07-25 19:17:44 +00:00
Kernel+LibC: Clean up how assertions work in the kernel and LibC
This also brings LibC's abort() function closer to the spec.
This commit is contained in:
parent
33a9b2a3c3
commit
f033416893
13 changed files with 36 additions and 73 deletions
|
@ -249,8 +249,12 @@ void abort()
|
|||
// For starters, send ourselves a SIGABRT.
|
||||
raise(SIGABRT);
|
||||
// If that didn't kill us, try harder.
|
||||
raise(SIGKILL);
|
||||
_exit(127);
|
||||
sigset_t set;
|
||||
sigemptyset(&set);
|
||||
sigaddset(&set, SIGABRT);
|
||||
sigprocmask(SIG_UNBLOCK, &set, nullptr);
|
||||
raise(SIGABRT);
|
||||
_abort();
|
||||
}
|
||||
|
||||
static HashTable<const char*> s_malloced_environment_variables;
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue