mirror of
https://github.com/LadybirdBrowser/ladybird.git
synced 2024-11-22 15:40:19 +00:00
153ea704af
It only works for sending a signal to a process that's in userspace code. We implement reception by synthesizing a PUSHA+PUSHF in the receiving process (operating on values in the TSS.) The TSS CS:EIP is then rerouted to the signal handler and a tiny return trampoline is constructed in a dedicated region in the receiving process. Also hacked up /bin/kill to be able to send arbitrary signals (kill -N PID)
19 lines
324 B
C
19 lines
324 B
C
#pragma once
|
|
|
|
#include <sys/cdefs.h>
|
|
#include <sys/types.h>
|
|
|
|
__BEGIN_DECLS
|
|
|
|
void* malloc(size_t) __MALLOC;
|
|
void free(void*);
|
|
void* calloc(size_t nmemb, size_t);
|
|
void* realloc(void *ptr, size_t);
|
|
char* getenv(const char* name);
|
|
int atoi(const char*);
|
|
|
|
void exit(int status) __NORETURN;
|
|
void abort() __NORETURN;
|
|
|
|
__END_DECLS
|
|
|