summaryrefslogtreecommitdiff
path: root/legacy/efreet
diff options
context:
space:
mode:
authorSebastian Dransfeld <sd@tango.flipp.net>2010-12-08 21:39:23 +0000
committerSebastian Dransfeld <sd@tango.flipp.net>2010-12-08 21:39:23 +0000
commit84fdf4e0efd45a64232a6aebee3f51b5484c1a1b (patch)
tree71d36905852952c7761f0bf3ddfe0c5c5fbad919 /legacy/efreet
parented43ae5263862f958e8c3137b67cbabc32536eb2 (diff)
don't terminate execs
they finish very quickly, not need to terminate SVN revision: 55383
Diffstat (limited to 'legacy/efreet')
-rw-r--r--legacy/efreet/src/bin/efreet_desktop_cache_create.c38
-rw-r--r--legacy/efreet/src/lib/efreet_cache.c2
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;
29 29
30static int verbose = 0; 30static int verbose = 0;
31 31
32static char file[PATH_MAX] = { '\0' };
33static char util_file[PATH_MAX] = { '\0' };
34
35static void
36term_handler(int sig __UNUSED__, siginfo_t * info __UNUSED__, void *data __UNUSED__)
37{
38 if (util_file[0]) unlink(util_file);
39 if (file[0]) unlink(file);
40 if (verbose) printf("EXIT\n");
41 exit(1);
42}
43
44static void
45catch_sigterm(void)
46{
47 struct sigaction act;
48
49 act.sa_sigaction = term_handler;
50 act.sa_flags = SA_RESTART | SA_SIGINFO;
51 sigemptyset(&act.sa_mask);
52
53 if (sigaction(SIGTERM, &act, NULL) < 0)
54 perror("sigaction"); /* It's bad if we can't deal with SIGTERM, but not dramatic */
55}
56
57static int 32static int
58strcmplen(const void *data1, const void *data2) 33strcmplen(const void *data1, const void *data2)
59{ 34{
@@ -243,7 +218,9 @@ main(int argc, char **argv)
243 int changed = 0; 218 int changed = 0;
244 int i; 219 int i;
245 struct flock fl; 220 struct flock fl;
246 struct sigaction act; 221 char file[PATH_MAX] = { '\0' };
222 char util_file[PATH_MAX] = { '\0' };
223
247 224
248 for (i = 1; i < argc; i++) 225 for (i = 1; i < argc; i++)
249 { 226 {
@@ -263,9 +240,6 @@ main(int argc, char **argv)
263 if (!eet_init()) goto eet_error; 240 if (!eet_init()) goto eet_error;
264 if (!ecore_init()) goto ecore_error; 241 if (!ecore_init()) goto ecore_error;
265 242
266 // Trap SIGTERM for clean shutdown
267 catch_sigterm();
268
269 efreet_cache_update = 0; 243 efreet_cache_update = 0;
270 244
271 /* create homedir */ 245 /* create homedir */
@@ -414,12 +388,6 @@ main(int argc, char **argv)
414 eet_close(util_ef); 388 eet_close(util_ef);
415 eet_close(ef); 389 eet_close(ef);
416 390
417 /* Remove signal handler, no need to exit now */
418 act.sa_sigaction = SIG_IGN;
419 act.sa_flags = SA_RESTART | SA_SIGINFO;
420 sigemptyset(&act.sa_mask);
421 sigaction(SIGTERM, &act, NULL);
422
423 /* unlink old cache files */ 391 /* unlink old cache files */
424 if (changed) 392 if (changed)
425 { 393 {
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)
162 desktop_cache_job = NULL; 162 desktop_cache_job = NULL;
163 } 163 }
164#ifdef ICON_CACHE 164#ifdef ICON_CACHE
165 if (icon_cache_exe) ecore_exe_terminate(icon_cache_exe);
166 if (icon_cache_exe_lock > 0) 165 if (icon_cache_exe_lock > 0)
167 { 166 {
168 close(icon_cache_exe_lock); 167 close(icon_cache_exe_lock);
@@ -170,7 +169,6 @@ efreet_cache_shutdown(void)
170 } 169 }
171#endif 170#endif
172 171
173 if (desktop_cache_exe) ecore_exe_terminate(desktop_cache_exe);
174 if (desktop_cache_exe_lock > 0) 172 if (desktop_cache_exe_lock > 0)
175 { 173 {
176 close(desktop_cache_exe_lock); 174 close(desktop_cache_exe_lock);