Fixed bug preventing Ctrl+C from working properly.
This commit is contained in:
parent
de80453268
commit
d543360bd0
11
util.c
11
util.c
|
@ -40,7 +40,16 @@ static void sigint_handler(int signum)
|
||||||
|
|
||||||
void ctrlc_init(void)
|
void ctrlc_init(void)
|
||||||
{
|
{
|
||||||
signal(SIGINT, sigint_handler);
|
#ifdef WIN32
|
||||||
|
signal(SIGINT, sigint_handler);
|
||||||
|
#else
|
||||||
|
const static struct sigaction siga = {
|
||||||
|
.sa_handler = sigint_handler,
|
||||||
|
.sa_flags = 0
|
||||||
|
};
|
||||||
|
|
||||||
|
sigaction(SIGINT, &siga, NULL);
|
||||||
|
#endif
|
||||||
}
|
}
|
||||||
|
|
||||||
void ctrlc_reset(void)
|
void ctrlc_reset(void)
|
||||||
|
|
Loading…
Reference in New Issue