unix/unix_mphal: Properly initialize struct sigaction.
This solves long-standing non-deterministic bug, which manifested itself on x86 32-bit (at least of reported cases) - segfault on Ctrl+C (i.e. SIGINT).
This commit is contained in:
parent
02fa8dff85
commit
3db2b23060
@ -53,6 +53,7 @@ void mp_hal_set_interrupt_char(char c) {
|
||||
#ifndef _WIN32
|
||||
// enable signal handler
|
||||
struct sigaction sa;
|
||||
memset(&sa, 0, sizeof(sa));
|
||||
sa.sa_handler = sighandler;
|
||||
sigemptyset(&sa.sa_mask);
|
||||
sigaction(SIGINT, &sa, NULL);
|
||||
|
Loading…
Reference in New Issue
Block a user