diff options
Diffstat (limited to 'src')
-rw-r--r-- | src/jalv.c | 10 |
1 files changed, 10 insertions, 0 deletions
@@ -878,8 +878,18 @@ main(int argc, char** argv) zix_sem_init(&jalv.paused, 0); zix_sem_init(&jalv.worker.sem, 0); +#ifdef HAVE_SIGACTION + struct sigaction action; + sigemptyset(&action.sa_mask); + action.sa_flags = 0; + action.sa_handler = signal_handler; + sigaction(SIGINT, &action, NULL); + sigaction(SIGTERM, &action, NULL); +#else + /* May not work in combination with fgets in the console interface */ signal(SIGINT, signal_handler); signal(SIGTERM, signal_handler); +#endif /* Find all installed plugins */ LilvWorld* world = lilv_world_new(); |