From 84fdf4e0efd45a64232a6aebee3f51b5484c1a1b Mon Sep 17 00:00:00 2001 From: Sebastian Dransfeld Date: Wed, 8 Dec 2010 21:39:23 +0000 Subject: [PATCH] don't terminate execs they finish very quickly, not need to terminate SVN revision: 55383 --- .../src/bin/efreet_desktop_cache_create.c | 38 ++----------------- legacy/efreet/src/lib/efreet_cache.c | 2 - 2 files changed, 3 insertions(+), 37 deletions(-) diff --git a/legacy/efreet/src/bin/efreet_desktop_cache_create.c b/legacy/efreet/src/bin/efreet_desktop_cache_create.c index 07b2520205..ce726b0762 100644 --- a/legacy/efreet/src/bin/efreet_desktop_cache_create.c +++ b/legacy/efreet/src/bin/efreet_desktop_cache_create.c @@ -29,31 +29,6 @@ static Eina_Hash *paths = NULL; static int verbose = 0; -static char file[PATH_MAX] = { '\0' }; -static char util_file[PATH_MAX] = { '\0' }; - -static void -term_handler(int sig __UNUSED__, siginfo_t * info __UNUSED__, void *data __UNUSED__) -{ - if (util_file[0]) unlink(util_file); - if (file[0]) unlink(file); - if (verbose) printf("EXIT\n"); - exit(1); -} - -static void -catch_sigterm(void) -{ - struct sigaction act; - - act.sa_sigaction = term_handler; - act.sa_flags = SA_RESTART | SA_SIGINFO; - sigemptyset(&act.sa_mask); - - if (sigaction(SIGTERM, &act, NULL) < 0) - perror("sigaction"); /* It's bad if we can't deal with SIGTERM, but not dramatic */ -} - static int strcmplen(const void *data1, const void *data2) { @@ -243,7 +218,9 @@ main(int argc, char **argv) int changed = 0; int i; struct flock fl; - struct sigaction act; + char file[PATH_MAX] = { '\0' }; + char util_file[PATH_MAX] = { '\0' }; + for (i = 1; i < argc; i++) { @@ -263,9 +240,6 @@ main(int argc, char **argv) if (!eet_init()) goto eet_error; if (!ecore_init()) goto ecore_error; - // Trap SIGTERM for clean shutdown - catch_sigterm(); - efreet_cache_update = 0; /* create homedir */ @@ -414,12 +388,6 @@ main(int argc, char **argv) eet_close(util_ef); eet_close(ef); - /* Remove signal handler, no need to exit now */ - act.sa_sigaction = SIG_IGN; - act.sa_flags = SA_RESTART | SA_SIGINFO; - sigemptyset(&act.sa_mask); - sigaction(SIGTERM, &act, NULL); - /* unlink old cache files */ if (changed) { diff --git a/legacy/efreet/src/lib/efreet_cache.c b/legacy/efreet/src/lib/efreet_cache.c index b38b28878f..f3a33104b6 100644 --- a/legacy/efreet/src/lib/efreet_cache.c +++ b/legacy/efreet/src/lib/efreet_cache.c @@ -162,7 +162,6 @@ efreet_cache_shutdown(void) desktop_cache_job = NULL; } #ifdef ICON_CACHE - if (icon_cache_exe) ecore_exe_terminate(icon_cache_exe); if (icon_cache_exe_lock > 0) { close(icon_cache_exe_lock); @@ -170,7 +169,6 @@ efreet_cache_shutdown(void) } #endif - if (desktop_cache_exe) ecore_exe_terminate(desktop_cache_exe); if (desktop_cache_exe_lock > 0) { close(desktop_cache_exe_lock);