tracker r1915 - in branches/indexer-split: . src/trackerd
- From: mr svn gnome org
- To: svn-commits-list gnome org
- Subject: tracker r1915 - in branches/indexer-split: . src/trackerd
- Date: Wed, 23 Jul 2008 12:20:56 +0000 (UTC)
Author: mr
Date: Wed Jul 23 12:20:55 2008
New Revision: 1915
URL: http://svn.gnome.org/viewvc/tracker?rev=1915&view=rev
Log:
* src/trackerd/tracker-main.c: (main): Call nice() to try and
limit how much attention the daemon gets from the CPU.
Modified:
branches/indexer-split/ChangeLog
branches/indexer-split/src/trackerd/tracker-main.c
Modified: branches/indexer-split/src/trackerd/tracker-main.c
==============================================================================
--- branches/indexer-split/src/trackerd/tracker-main.c (original)
+++ branches/indexer-split/src/trackerd/tracker-main.c Wed Jul 23 12:20:55 2008
@@ -588,6 +588,19 @@
initialize_signal_handler ();
+ /* 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...
+ */
+ 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");
+ }
+
/* This makes sure we have all the locations like the data
* dir, user data dir, etc all configured.
*
[
Date Prev][
Date Next] [
Thread Prev][
Thread Next]
[
Thread Index]
[
Date Index]
[
Author Index]