Skip to content
Snippets Groups Projects
Commit 35a3ff8b authored by Christopher Bohn's avatar Christopher Bohn :thinking:
Browse files

Corrected bug in client in which the cursor isn't restored after SIGINT

parent 0ad6972d
Branches
No related tags found
No related merge requests found
...@@ -142,7 +142,18 @@ void *handle_outputs(void *window_arg) { ...@@ -142,7 +142,18 @@ void *handle_outputs(void *window_arg) {
void on_signal(int sig) { void on_signal(int sig) {
running = false; running = false;
send_message(socket_fd, "EXIT"); send_message(socket_fd, "EXIT");
cleanup(); // cleanup();
sigset(SIGINT, SIG_IGN);
sigset(SIGSEGV, SIG_IGN);
sigset(SIGABRT, SIG_IGN);
nocrmode();
echo();
nl();
curs_set(initial_cursor_state);
endwin();
close(socket_fd);
pthread_mutex_destroy(&mutex);
fprintf(stderr, "Terminating due to signal %d.\n", sig); fprintf(stderr, "Terminating due to signal %d.\n", sig);
exit(128 + sig); exit(128 + sig);
} }
......
0% Loading or .
You are about to add 0 people to the discussion. Proceed with caution.
Please register or to comment