diff options
Diffstat (limited to 'src')
| -rw-r--r-- | src/main.c | 14 |
1 files changed, 14 insertions, 0 deletions
@@ -388,7 +388,21 @@ main(int argc, char **argv) getchar(); #endif + /* + * FIXME: Gracefully handle SIGTERM. + * This however would require polling for the flag in Curses + * getch() loops. + * GTK already catches SIGTERM. + */ +#ifdef HAVE_SIGACTION + static const struct sigaction sigint = { + .sa_handler = teco_sigint_handler, + .sa_flags = 0 /* don't auto-restart syscalls */ + }; + sigaction(SIGINT, &sigint, NULL); +#else signal(SIGINT, teco_sigint_handler); +#endif /* * Important for Unicode handling in curses and glib. |
