[tracker/tracker-0.10: 27/32] tracker-miner-fs: Fix error check after setting process priority



commit 00407c217bd007542cc03714098b7c788b651444
Author: JÃrg Billeter <j bitron ch>
Date:   Wed Jun 22 12:51:37 2011 +0200

    tracker-miner-fs: Fix error check after setting process priority

 src/miners/fs/tracker-main.c |    3 ++-
 1 files changed, 2 insertions(+), 1 deletions(-)
---
diff --git a/src/miners/fs/tracker-main.c b/src/miners/fs/tracker-main.c
index 05b1ea7..cd2f2f4 100644
--- a/src/miners/fs/tracker-main.c
+++ b/src/miners/fs/tracker-main.c
@@ -184,7 +184,8 @@ initialize_priority (void)
 	 * Stupid...
 	 */
 
-	if (nice (19) == -1) {
+	errno = 0;
+	if (nice (19) == -1 && errno != 0) {
 		const gchar *str = g_strerror (errno);
 
 		g_message ("Couldn't set nice value to 19, %s",



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