mirror of
https://github.com/darlinghq/darling-xnu.git
synced 2024-11-23 04:29:53 +00:00
Grab The Current PID To Abort On
Setting the pid to 0 will send the SIGABRT signal to "every process in the process group of the calling process". This means that darlingserver will also get killed as a result (which we don't want to happen).
This commit is contained in:
parent
60dc3751f3
commit
780bd91d1c
@ -5,6 +5,7 @@
|
||||
#include <linux-syscalls/linux.h>
|
||||
#include "mach/lkm.h"
|
||||
#include "signal/kill.h"
|
||||
#include "unistd/getpid.h"
|
||||
#include <sys/signal.h>
|
||||
#include <darlingserver/rpc.h>
|
||||
|
||||
@ -574,6 +575,6 @@ have_nl:
|
||||
|
||||
__attribute__ ((visibility ("default")))
|
||||
void __simple_abort(void) {
|
||||
sys_kill(0, SIGABRT, 1);
|
||||
sys_kill(sys_getpid(), SIGABRT, 1);
|
||||
__builtin_unreachable();
|
||||
};
|
||||
|
Loading…
Reference in New Issue
Block a user