[tracker/rss-enclosures] Fixes GB#615182 - Avoid initializing priorities twice in tracker-miner-fs



commit 968a8fe3b11dabadf828341210bb76ac0c8b0979
Author: Aleksander Morgado <aleksander lanedo com>
Date:   Mon Apr 12 15:46:04 2010 +0100

    Fixes GB#615182 - Avoid initializing priorities twice in tracker-miner-fs

 src/miners/fs/tracker-main.c |   22 +++-------------------
 1 files changed, 3 insertions(+), 19 deletions(-)
---
diff --git a/src/miners/fs/tracker-main.c b/src/miners/fs/tracker-main.c
index da2556f..f661570 100644
--- a/src/miners/fs/tracker-main.c
+++ b/src/miners/fs/tracker-main.c
@@ -179,7 +179,7 @@ initialize_priority (void)
 	 * so complains if we do not check its returned value. But it
 	 * seems that since glibc 2.2.4, nice() can return -1 on a
 	 * successful call so we have to check value of errno too.
-	 * Stupid... 
+	 * Stupid...
 	 */
 	g_message ("Setting process priority");
 
@@ -564,9 +564,6 @@ main (gint argc, gchar *argv[])
 		tracker_config_set_initial_sleep (config, initial_sleep);
 	}
 
-	/* Make sure we initialize DBus, this shows we are started
-	 * successfully when called upon from the daemon.
-	 */
 	tracker_log_init (tracker_config_get_verbosity (config),
 	                  &log_filename);
 	g_print ("Starting log:\n  File:'%s'\n", log_filename);
@@ -574,22 +571,9 @@ main (gint argc, gchar *argv[])
 
 	sanity_check_option_values (config);
 
-	/* Set IO priority */
-	tracker_ioprio_init ();
-
-	/* nice() uses attribute "warn_unused_result" and so complains
-	 * if we do not check its returned value. But it seems that
-	 * since glibc 2.2.4, nice() can return -1 on a successful
-	 * call so we have to check value of errno too. Stupid...
+	/* Make sure we initialize DBus, this shows we are started
+	 * successfully when called upon from the daemon.
 	 */
-	if (nice (19) == -1 && errno) {
-		const gchar *str;
-
-		str = g_strerror (errno);
-		g_message ("Couldn't set nice value to 19, %s",
-		           str ? str : "no error given");
-	}
-
 	if (!tracker_dbus_init ()) {
 		g_object_unref (config);
 		tracker_log_shutdown ();



[Date Prev][Date Next]   [Thread Prev][Thread Next]   [Thread Index] [Date Index] [Author Index]