36 |
#define MPROTECT_ACTION_FLAGS SA_RESTART |
#define MPROTECT_ACTION_FLAGS SA_RESTART |
37 |
#define INSTALL_MPROTECT_HANDLER \ |
#define INSTALL_MPROTECT_HANDLER \ |
38 |
do {static struct sigaction action; \ |
do {static struct sigaction action; \ |
39 |
action.sa_handler = memprotect_handler; \ |
action.sa_handler = (void *)memprotect_handler; \ |
40 |
action.sa_flags = MPROTECT_ACTION_FLAGS; \ |
action.sa_flags = MPROTECT_ACTION_FLAGS; \ |
41 |
action.sa_restorer = 0; \ |
action.sa_restorer = 0; \ |
42 |
sigemptyset(&action.sa_mask); \ |
sigemptyset(&action.sa_mask); \ |