forked from enlightenment/efl
don't terminate execs
they finish very quickly, not need to terminate SVN revision: 55383
This commit is contained in:
parent
ed43ae5263
commit
84fdf4e0ef
|
@ -29,31 +29,6 @@ static Eina_Hash *paths = NULL;
|
||||||
|
|
||||||
static int verbose = 0;
|
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
|
static int
|
||||||
strcmplen(const void *data1, const void *data2)
|
strcmplen(const void *data1, const void *data2)
|
||||||
{
|
{
|
||||||
|
@ -243,7 +218,9 @@ main(int argc, char **argv)
|
||||||
int changed = 0;
|
int changed = 0;
|
||||||
int i;
|
int i;
|
||||||
struct flock fl;
|
struct flock fl;
|
||||||
struct sigaction act;
|
char file[PATH_MAX] = { '\0' };
|
||||||
|
char util_file[PATH_MAX] = { '\0' };
|
||||||
|
|
||||||
|
|
||||||
for (i = 1; i < argc; i++)
|
for (i = 1; i < argc; i++)
|
||||||
{
|
{
|
||||||
|
@ -263,9 +240,6 @@ main(int argc, char **argv)
|
||||||
if (!eet_init()) goto eet_error;
|
if (!eet_init()) goto eet_error;
|
||||||
if (!ecore_init()) goto ecore_error;
|
if (!ecore_init()) goto ecore_error;
|
||||||
|
|
||||||
// Trap SIGTERM for clean shutdown
|
|
||||||
catch_sigterm();
|
|
||||||
|
|
||||||
efreet_cache_update = 0;
|
efreet_cache_update = 0;
|
||||||
|
|
||||||
/* create homedir */
|
/* create homedir */
|
||||||
|
@ -414,12 +388,6 @@ main(int argc, char **argv)
|
||||||
eet_close(util_ef);
|
eet_close(util_ef);
|
||||||
eet_close(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 */
|
/* unlink old cache files */
|
||||||
if (changed)
|
if (changed)
|
||||||
{
|
{
|
||||||
|
|
|
@ -162,7 +162,6 @@ efreet_cache_shutdown(void)
|
||||||
desktop_cache_job = NULL;
|
desktop_cache_job = NULL;
|
||||||
}
|
}
|
||||||
#ifdef ICON_CACHE
|
#ifdef ICON_CACHE
|
||||||
if (icon_cache_exe) ecore_exe_terminate(icon_cache_exe);
|
|
||||||
if (icon_cache_exe_lock > 0)
|
if (icon_cache_exe_lock > 0)
|
||||||
{
|
{
|
||||||
close(icon_cache_exe_lock);
|
close(icon_cache_exe_lock);
|
||||||
|
@ -170,7 +169,6 @@ efreet_cache_shutdown(void)
|
||||||
}
|
}
|
||||||
#endif
|
#endif
|
||||||
|
|
||||||
if (desktop_cache_exe) ecore_exe_terminate(desktop_cache_exe);
|
|
||||||
if (desktop_cache_exe_lock > 0)
|
if (desktop_cache_exe_lock > 0)
|
||||||
{
|
{
|
||||||
close(desktop_cache_exe_lock);
|
close(desktop_cache_exe_lock);
|
||||||
|
|
Loading…
Reference in New Issue