Fixed signal handling on windows
This commit is contained in:
parent
051e97b96a
commit
1feeca65ce
2 changed files with 9 additions and 3 deletions
|
@ -8,8 +8,9 @@ Test(simple, caught, .signal = SIGSEGV) {
|
|||
*i = 42;
|
||||
}
|
||||
|
||||
Test(simple, wrong_signal, .signal = SIGSEGV) {
|
||||
raise(SIGINT);
|
||||
Test(simple, wrong_signal, .signal = SIGINT) {
|
||||
int *i = NULL;
|
||||
*i = 42;
|
||||
}
|
||||
|
||||
Test(simple, uncaught) {
|
||||
|
|
|
@ -28,6 +28,11 @@
|
|||
# define WRITE_PROCESS_(Proc, What, Size) \
|
||||
WriteProcessMemory(Proc, &What, &What, Size, NULL);
|
||||
|
||||
# include <signal.h>
|
||||
# ifndef SIGALRM
|
||||
# define SIGALRM 14
|
||||
# endif
|
||||
|
||||
#else
|
||||
# include <unistd.h>
|
||||
# include <sys/wait.h>
|
||||
|
@ -191,7 +196,7 @@ void wait_process(s_proc_handle *handle, int *status) {
|
|||
GetExitCodeProcess(handle->handle, &exit_code);
|
||||
CloseHandle(handle->handle);
|
||||
|
||||
int sig = 0;
|
||||
unsigned int sig = 0;
|
||||
switch (exit_code) {
|
||||
case STATUS_FLOAT_DENORMAL_OPERAND:
|
||||
case STATUS_FLOAT_DIVIDE_BY_ZERO:
|
||||
|
|
Loading…
Add table
Reference in a new issue