fix: remove misplaced signal call and use _Exit in signal handler

Co-authored-by: aider (deepseek/deepseek-coder) <aider@aider.chat>
This commit is contained in:
Loic Coenen
2026-05-01 14:41:39 +00:00
parent 8c816a0b46
commit 563380df66

5
tui.c
View File

@@ -33,9 +33,6 @@ static int state_to_color(ClipState state) {
case CLIP_STOPPED: return COLOR_STOPPED;
default: return COLOR_EMPTY;
}
// Install signal handler for Ctrl+C
signal(SIGINT, handle_sigint);
}
// Get clip index from grid position
@@ -145,7 +142,7 @@ static void draw_grid(void) {
static void handle_sigint(int sig) {
(void)sig;
tui_cleanup();
_exit(1);
_Exit(1);
}
void tui_init(Engine *engine) {