aboutsummaryrefslogtreecommitdiffstats
path: root/src/bin/efreet
diff options
context:
space:
mode:
authorCarsten Haitzler (Rasterman) <raster@rasterman.com>2013-12-28 10:22:23 +0900
committerCarsten Haitzler (Rasterman) <raster@rasterman.com>2013-12-28 10:22:23 +0900
commit0aa4de9f1d31452e568f561cd543ad5bc929b24e (patch)
tree593abffb7a981a1c9b09a6c72daa48fe994d6c5c /src/bin/efreet
parentEvas textblock: Fixed range_text_get bug with multiple text nodes. (diff)
downloadefl-0aa4de9f1d31452e568f561cd543ad5bc929b24e.tar.gz
efreet - minor formatting and move set prirority to very start
Diffstat (limited to 'src/bin/efreet')
-rw-r--r--src/bin/efreet/efreetd.c21
1 files changed, 9 insertions, 12 deletions
diff --git a/src/bin/efreet/efreetd.c b/src/bin/efreet/efreetd.c
index 2a61affab6..1661ec293b 100644
--- a/src/bin/efreet/efreetd.c
+++ b/src/bin/efreet/efreetd.c
@@ -31,8 +31,14 @@ main(int argc, char *argv[])
int fd;
mode_t um;
+#ifdef HAVE_SYS_RESOURCE_H
+ setpriority(PRIO_PROCESS, 0, 19);
+#elif _WIN32
+ SetPriorityClass(GetCurrentProcess(), IDLE_PRIORITY_CLASS);
+#endif
+
strcpy(path, "/tmp/efreetd_XXXXXX");
- um = umask(S_IRWXG|S_IRWXO);
+ um = umask(S_IRWXG | S_IRWXO);
fd = mkstemp(path);
umask(um);
if (fd < 0)
@@ -40,32 +46,24 @@ main(int argc, char *argv[])
perror("mkstemp");
return 1;
}
-
log = fdopen(fd, "wb");
if (!log) return 1;
if (!eina_init()) return 1;
eina_log_print_cb_set(eina_log_print_cb_file, log);
-
efreetd_log_dom = eina_log_domain_register("efreetd", EFREETD_DEFAULT_LOG_COLOR);
if (efreetd_log_dom < 0)
{
EINA_LOG_ERR("Efreet: Could not create a log domain for efreetd.");
goto ecore_error;
}
+
if (!ecore_init()) goto ecore_error;
ecore_app_args_set(argc, (const char **)argv);
if (!ecore_file_init()) goto ecore_file_error;
-
if (!dbus_init()) goto dbus_error;
if (!cache_init()) goto cache_error;
-#ifdef HAVE_SYS_RESOURCE_H
- setpriority(PRIO_PROCESS, 0, 19);
-#elif _WIN32
- SetPriorityClass(GetCurrentProcess(), IDLE_PRIORITY_CLASS);
-#endif
-
ecore_main_loop_begin();
cache_shutdown();
@@ -84,8 +82,7 @@ dbus_error:
ecore_file_error:
ecore_shutdown();
ecore_error:
- if (efreetd_log_dom >= 0)
- eina_log_domain_unregister(efreetd_log_dom);
+ if (efreetd_log_dom >= 0) eina_log_domain_unregister(efreetd_log_dom);
efreetd_log_dom = -1;
eina_shutdown();
return 1;