From 38bad7fac09d39b183492bff87c5d2476bdf89c2 Mon Sep 17 00:00:00 2001 From: Sebastian Dransfeld Date: Tue, 23 Nov 2010 16:50:16 +0000 Subject: [PATCH] catch term, not int SVN revision: 54892 --- legacy/efreet/src/bin/efreet_desktop_cache_create.c | 12 ++++++------ legacy/efreet/src/bin/efreet_icon_cache_create.c | 12 ++++++------ 2 files changed, 12 insertions(+), 12 deletions(-) diff --git a/legacy/efreet/src/bin/efreet_desktop_cache_create.c b/legacy/efreet/src/bin/efreet_desktop_cache_create.c index fe512eb7a0..2647cb80e8 100644 --- a/legacy/efreet/src/bin/efreet_desktop_cache_create.c +++ b/legacy/efreet/src/bin/efreet_desktop_cache_create.c @@ -31,7 +31,7 @@ static char file[PATH_MAX] = { '\0' }; static char util_file[PATH_MAX] = { '\0' }; static void -int_handler (int sig, siginfo_t * info, void *data) +term_handler (int sig, siginfo_t * info, void *data) { if (util_file[0]) unlink(util_file); if (file[0]) unlink(file); @@ -247,12 +247,12 @@ main(int argc, char **argv) if (!eet_init()) goto eet_error; if (!ecore_init()) goto ecore_error; - // Trap SIGINT for clean shutdown - act.sa_sigaction = int_handler; + // Trap SIGTERM for clean shutdown + act.sa_sigaction = term_handler; act.sa_flags = SA_RESTART | SA_SIGINFO; sigemptyset(&act.sa_mask); - if (sigaction(SIGINT, &act, NULL) < 0) + if (sigaction(SIGTERM, &act, NULL) < 0) { perror("sigaction"); goto efreet_error; @@ -401,10 +401,10 @@ main(int argc, char **argv) eet_close(ef); /* Remove signal handler, no need to exit now */ - act.sa_sigaction = SIG_DFL; + act.sa_sigaction = SIG_IGN; act.sa_flags = SA_RESTART | SA_SIGINFO; sigemptyset(&act.sa_mask); - sigaction(SIGINT, &act, NULL); + sigaction(SIGTERM, &act, NULL); /* unlink old cache files */ if (changed) diff --git a/legacy/efreet/src/bin/efreet_icon_cache_create.c b/legacy/efreet/src/bin/efreet_icon_cache_create.c index 0cd37b85ba..eb94b13779 100644 --- a/legacy/efreet/src/bin/efreet_icon_cache_create.c +++ b/legacy/efreet/src/bin/efreet_icon_cache_create.c @@ -28,7 +28,7 @@ static int verbose = 0; static char file[PATH_MAX] = { '\0' }; static void -int_handler (int sig, siginfo_t * info, void *data) +term_handler (int sig, siginfo_t * info, void *data) { if (file[0]) unlink(file); if (verbose) printf("EXIT\n"); @@ -295,12 +295,12 @@ main(int argc, char **argv) if (!eet_init()) goto eet_error; if (!ecore_init()) goto ecore_error; - // Trap SIGINT for clean shutdown - act.sa_sigaction = int_handler; + // Trap SIGTERM for clean shutdown + act.sa_sigaction = term_handler; act.sa_flags = SA_RESTART | SA_SIGINFO; sigemptyset(&act.sa_mask); - if (sigaction(SIGINT, &act, NULL) < 0) + if (sigaction(SIGTERM, &act, NULL) < 0) { perror("sigaction"); goto efreet_error; @@ -460,10 +460,10 @@ main(int argc, char **argv) } /* Remove signal handler, no need to exit now */ - act.sa_sigaction = SIG_DFL; + act.sa_sigaction = SIG_IGN; act.sa_flags = SA_RESTART | SA_SIGINFO; sigemptyset(&act.sa_mask); - sigaction(SIGINT, &act, NULL); + sigaction(SIGTERM, &act, NULL); eina_list_free(extensions);