catch term, not int
authorenglebass <englebass@7cbeb6ba-43b4-40fd-8cce-4c39aea84d33>
Tue, 23 Nov 2010 16:50:16 +0000 (16:50 +0000)
committerenglebass <englebass@7cbeb6ba-43b4-40fd-8cce-4c39aea84d33>
Tue, 23 Nov 2010 16:50:16 +0000 (16:50 +0000)
git-svn-id: svn+ssh://svn.enlightenment.org/var/svn/e/trunk/efreet@54892 7cbeb6ba-43b4-40fd-8cce-4c39aea84d33

src/bin/efreet_desktop_cache_create.c
src/bin/efreet_icon_cache_create.c

index fe512eb..2647cb8 100644 (file)
@@ -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)
index 0cd37b8..eb94b13 100644 (file)
@@ -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);