mirror of
https://github.com/neovim/neovim.git
synced 2025-02-25 18:55:25 -06:00
Stop queueing events when signals are rejected
The only exception is SIGINT, which will set `got_int` directly. This will be necessary for the new implementation of `mch_call_shell`
This commit is contained in:
parent
cb9afe0dc0
commit
796b79db8c
@ -148,9 +148,18 @@ static void deadly_signal(int signum)
|
||||
|
||||
static void signal_cb(uv_signal_t *handle, int signum)
|
||||
{
|
||||
Event *event = (Event *)xmalloc(sizeof(Event));
|
||||
event->type = kEventSignal;
|
||||
event->data = xmalloc(sizeof(int));
|
||||
*(int *)event->data = signum;
|
||||
event_push(event);
|
||||
Event *event;
|
||||
|
||||
if (rejecting_deadly) {
|
||||
if (signum == SIGINT) {
|
||||
got_int = TRUE;
|
||||
}
|
||||
} else {
|
||||
event = (Event *)xmalloc(sizeof(Event));
|
||||
event->type = kEventSignal;
|
||||
event->data = xmalloc(sizeof(int));
|
||||
*(int *)event->data = signum;
|
||||
event_push(event);
|
||||
}
|
||||
|
||||
}
|
||||
|
Loading…
Reference in New Issue
Block a user