[Xfce4-commits] <tumbler:master> Set nice value of tumblerd to 19 (bug #9627).

Nick Schermer noreply at xfce.org
Sun May 5 13:40:01 CEST 2013


Updating branch refs/heads/master
         to 8b9fff06a60fc16ad1e55c048e9790932981abfa (commit)
       from 4f6fcb54fe2d5dd2d8e7287cf3223431c6d98b3f (commit)

commit 8b9fff06a60fc16ad1e55c048e9790932981abfa
Author: Nick Schermer <nick at xfce.org>
Date:   Sun May 5 13:38:16 2013 +0200

    Set nice value of tumblerd to 19 (bug #9627).

 tumblerd/main.c |    8 ++++++++
 1 files changed, 8 insertions(+), 0 deletions(-)

diff --git a/tumblerd/main.c b/tumblerd/main.c
index a0782b1..8249fb2 100644
--- a/tumblerd/main.c
+++ b/tumblerd/main.c
@@ -28,6 +28,9 @@
 #ifdef HAVE_PWD_H
 #include <pwd.h>
 #endif
+#ifdef HAVE_UNISTD_H
+#include <unistd.h>
+#endif
 
 #include <stdlib.h>
 
@@ -241,6 +244,11 @@ main (int    argc,
   /* set the program name */
   g_set_prgname (G_LOG_DOMAIN);
 
+#ifdef G_OS_UNIX
+  if (nice (19) != 19)
+    g_warning (_("Couldn't change nice value of process."));
+#endif
+
 #ifdef DEBUG
   /* if something doesn't work, fix your code instead! */
   g_log_set_always_fatal (G_LOG_LEVEL_CRITICAL);


More information about the Xfce4-commits mailing list