Blob Blame History Raw
From 35dbe5e46ad7c8e2c6343349b87d44e71fa32eb8 Mon Sep 17 00:00:00 2001
From: Martyn Russell <martyn@lanedo.com>
Date: Mon, 13 Oct 2014 11:41:57 +0100
Subject: [PATCH] tracker-extract: Avoid the use of setrlimit() it's causing
 problems

Part of the solution is this commit, see:
https://bugzilla.gnome.org/show_bug.cgi?id=737663

The other part is to use cgroups
---
 src/tracker-extract/tracker-main.c | 12 ++----------
 1 file changed, 2 insertions(+), 10 deletions(-)

diff --git a/src/tracker-extract/tracker-main.c b/src/tracker-extract/tracker-main.c
index f7e3e55..22af4b2 100644
--- a/src/tracker-extract/tracker-main.c
+++ b/src/tracker-extract/tracker-main.c
@@ -29,9 +29,9 @@
 #include <sys/types.h>
 #include <unistd.h>
 
-#include <glib.h>
 #include <glib-object.h>
 #include <glib/gi18n.h>
+#include <glib/gprintf.h>
 #include <gio/gio.h>
 
 #ifndef G_OS_WIN32
@@ -42,12 +42,7 @@
 #include <libmediaart/mediaart.h>
 #endif
 
-#include <libtracker-common/tracker-log.h>
-#include <libtracker-common/tracker-dbus.h>
-#include <libtracker-common/tracker-os-dependant.h>
-#include <libtracker-common/tracker-ioprio.h>
-#include <libtracker-common/tracker-locale.h>
-#include <libtracker-common/tracker-sched.h>
+#include <libtracker-common/tracker-common.h>
 
 #include <libtracker-data/tracker-db-manager.h>
 
@@ -278,8 +273,6 @@ run_standalone (TrackerConfig *config)
 		return EXIT_FAILURE;
 	}
 
-	tracker_memory_setrlimits ();
-
 	tracker_extract_get_metadata_by_cmdline (object, uri, mime_type);
 
 	g_object_unref (object);
@@ -364,7 +357,6 @@ main (int argc, char *argv[])
 	/* This makes sure we don't steal all the system's resources */
 	initialize_priority_and_scheduling (tracker_config_get_sched_idle (config),
 	                                    tracker_db_manager_get_first_index_done () == FALSE);
-	tracker_memory_setrlimits ();
 
 	extract = tracker_extract_new (TRUE, force_module);
 
-- 
2.1.0