Just do it:) The little time I have I won't use for dbus fiddling. S.
Den 18. okt. 2012 kl. 14:34 skrev Gustavo Sverzut Barbieri <barbi...@profusion.mobi>: > I wonder why not a single daemon to manage the cache. And it is the single > point to inotify. > > Use DBus session and you get the single instance with automatic startup for > free. > > I know most people don't like DBus, but here it should do well. This daemon > is only emitting signals when cache change, eventually taking requests from > clients (? Not sure) > > On Thursday, October 18, 2012, Enlightenment SVN wrote: > >> Log: >> efreet: move update files >> >> Move update files to separate subdir to reduce inotify triggers >> >> Author: englebass >> Date: 2012-10-18 02:40:00 -0700 (Thu, 18 Oct 2012) >> New Revision: 78176 >> Trac: http://trac.enlightenment.org/e/changeset/78176 >> >> Modified: >> trunk/efreet/src/bin/efreet_desktop_cache_create.c >> trunk/efreet/src/bin/efreet_icon_cache_create.c >> trunk/efreet/src/lib/efreet_cache.c >> >> Modified: trunk/efreet/src/bin/efreet_desktop_cache_create.c >> =================================================================== >> --- trunk/efreet/src/bin/efreet_desktop_cache_create.c 2012-10-18 >> 09:39:44 UTC (rev 78175) >> +++ trunk/efreet/src/bin/efreet_desktop_cache_create.c 2012-10-18 >> 09:40:00 UTC (rev 78176) >> @@ -272,6 +272,12 @@ >> if (!ecore_file_mkpath(file)) goto efreet_error; >> efreet_setowner(file); >> } >> + snprintf(file, sizeof(file), "%s/efreet/update", >> efreet_cache_home_get()); >> + if (!ecore_file_exists(file)) >> + { >> + if (!ecore_file_mkpath(file)) goto efreet_error; >> + efreet_setowner(file); >> + } >> >> /* lock process, so that we only run one copy of this program */ >> lockfd = cache_lock_file(); >> @@ -491,7 +497,7 @@ >> } >> >> /* touch update file */ >> - snprintf(file, sizeof(file), "%s/efreet/desktop_data.update", >> efreet_cache_home_get()); >> + snprintf(file, sizeof(file), "%s/efreet/update/desktop_data.update", >> efreet_cache_home_get()); >> tmpfd = open(file, O_CREAT | O_WRONLY, S_IRUSR | S_IWUSR); >> if (tmpfd >= 0) >> { >> >> Modified: trunk/efreet/src/bin/efreet_icon_cache_create.c >> =================================================================== >> --- trunk/efreet/src/bin/efreet_icon_cache_create.c 2012-10-18 >> 09:39:44 UTC (rev 78175) >> +++ trunk/efreet/src/bin/efreet_icon_cache_create.c 2012-10-18 >> 09:40:00 UTC (rev 78176) >> @@ -852,6 +852,12 @@ >> if (!ecore_file_mkpath(file)) return -1; >> efreet_setowner(file); >> } >> + snprintf(file, sizeof(file), "%s/efreet/update", >> efreet_cache_home_get()); >> + if (!ecore_file_exists(file)) >> + { >> + if (!ecore_file_mkpath(file)) return -1; >> + efreet_setowner(file); >> + } >> >> /* lock process, so that we only run one copy of this program */ >> lockfd = cache_lock_file(); >> @@ -1112,7 +1118,7 @@ >> free(theme_version); >> >> /* touch update file */ >> - snprintf(file, sizeof(file), "%s/efreet/icon_data.update", >> efreet_cache_home_get()); >> + snprintf(file, sizeof(file), "%s/efreet/update/icon_data.update", >> efreet_cache_home_get()); >> tmpfd = open(file, O_CREAT | O_WRONLY, S_IRUSR | S_IWUSR); >> if (tmpfd >= 0) >> { >> >> Modified: trunk/efreet/src/lib/efreet_cache.c >> =================================================================== >> --- trunk/efreet/src/lib/efreet_cache.c 2012-10-18 09:39:44 UTC (rev 78175) >> +++ trunk/efreet/src/lib/efreet_cache.c 2012-10-18 09:40:00 UTC (rev 78176) >> @@ -142,6 +142,16 @@ >> } >> efreet_setowner(buf); >> } >> + snprintf(buf, sizeof(buf), "%s/efreet/update", >> efreet_cache_home_get()); >> + if (!ecore_file_exists(buf)) >> + { >> + if (!ecore_file_mkpath(buf)) >> + { >> + ERR("Failed to create directory '%s'", buf); >> + goto error; >> + } >> + efreet_setowner(buf); >> + } >> >> cache_exe_handler = ecore_event_handler_add(ECORE_EXE_EVENT_DEL, >> cache_exe_cb, NULL); >> >> >> >> ------------------------------------------------------------------------------ >> Everyone hates slow websites. So do we. >> Make your web apps faster with AppDynamics >> Download AppDynamics Lite for free today: >> http://p.sf.net/sfu/appdyn_sfd2d_oct >> _______________________________________________ >> enlightenment-svn mailing list >> enlightenment-...@lists.sourceforge.net <javascript:;> >> https://lists.sourceforge.net/lists/listinfo/enlightenment-svn >> > > > -- > Gustavo Sverzut Barbieri > http://profusion.mobi embedded systems > -------------------------------------- > MSN: barbi...@gmail.com > Skype: gsbarbieri > Mobile: +55 (19) 9225-2202 > ------------------------------------------------------------------------------ > Everyone hates slow websites. So do we. > Make your web apps faster with AppDynamics > Download AppDynamics Lite for free today: > http://p.sf.net/sfu/appdyn_sfd2d_oct > _______________________________________________ > enlightenment-devel mailing list > enlightenment-devel@lists.sourceforge.net > https://lists.sourceforge.net/lists/listinfo/enlightenment-devel ------------------------------------------------------------------------------ Everyone hates slow websites. So do we. Make your web apps faster with AppDynamics Download AppDynamics Lite for free today: http://p.sf.net/sfu/appdyn_sfd2d_oct _______________________________________________ enlightenment-devel mailing list enlightenment-devel@lists.sourceforge.net https://lists.sourceforge.net/lists/listinfo/enlightenment-devel