mirror of
https://github.com/RGBCube/serenity
synced 2025-07-25 16:07:47 +00:00
Kernel: Send more specific signals when crashing due to CPU exceptions.
- For division by zero, send SIGFPE. - For illegal instruction, send SIGILL. - For the rest, default to SIGSEGV.
This commit is contained in:
parent
0fa098845f
commit
6ffcee9176
3 changed files with 17 additions and 9 deletions
|
@ -13,6 +13,7 @@
|
|||
#include <Kernel/UnixTypes.h>
|
||||
#include <Kernel/Thread.h>
|
||||
#include <Kernel/Lock.h>
|
||||
#include <LibC/signal_numbers.h>
|
||||
|
||||
class ELFLoader;
|
||||
class FileDescriptor;
|
||||
|
@ -191,7 +192,7 @@ public:
|
|||
|
||||
static void initialize();
|
||||
|
||||
[[noreturn]] void crash();
|
||||
[[noreturn]] void crash(int signal = SIGSEGV);
|
||||
[[nodiscard]] static int reap(Process&);
|
||||
|
||||
const TTY* tty() const { return m_tty; }
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue