Implemented renicing (-20) in gnokiid mode
[gnokii.git] / gnokii / gnokii.c
index e6692ab..1cbe8fe 100644 (file)
@@ -4119,6 +4119,8 @@ int monitormode(int argc, char *argv[])
 
 #ifdef UCLINUX
 
+#define NICE_LEVEL (-20)
+
 static void gnokiid_SIGCHLD(int signo)
 {
        fprintf (stderr, _("Child process exited, aborting...\n"));
@@ -4180,6 +4182,8 @@ static int gnokiid(int argc, char *argv[])
 #ifdef DEBUG
   fprintf (stderr, _("Entering gnokiid virtual modem main loop...\n"));
 #endif
+       if (nice(NICE_LEVEL))
+               fprintf (stderr, _("WARNING: nice level change failed (by %d)\n"),NICE_LEVEL);
 
        VM_ThreadLoop();