+Index: new/exec/timer.c
+===================================================================
+--- new.orig/exec/timer.c 2013-01-16 11:12:46.000000000 +0100
++++ new/exec/timer.c 2013-01-16 11:13:40.000000000 +0100
+@@ -109,7 +109,7 @@
+ int fds;
+ unsigned long long timeout;
+
+-#if defined(HAVE_PTHREAD_SETSCHEDPARAM) && defined(HAVE_SCHED_GET_PRIORITY_MAX)
++#if 0 && defined(HAVE_PTHREAD_SETSCHEDPARAM) && defined(HAVE_SCHED_GET_PRIORITY_MAX)
+ if (sched_priority != 0) {
+ struct sched_param sched_param;
+
Index: new/exec/main.c
===================================================================
---- new.orig/exec/main.c 2013-01-11 15:35:35.000000000 +0100
-+++ new/exec/main.c 2013-01-11 15:36:39.000000000 +0100
-@@ -1265,7 +1265,7 @@
+--- new.orig/exec/main.c 2013-01-16 11:12:46.000000000 +0100
++++ new/exec/main.c 2013-01-16 11:13:40.000000000 +0100
+@@ -1265,6 +1265,7 @@
static void corosync_setscheduler (void)
{
--#if defined(HAVE_PTHREAD_SETSCHEDPARAM) && defined(HAVE_SCHED_GET_PRIORITY_MAX) && defined(HAVE_SCHED_SETSCHEDULER)
-+#if 0 && defined(HAVE_PTHREAD_SETSCHEDPARAM) && defined(HAVE_SCHED_GET_PRIORITY_MAX) && defined(HAVE_SCHED_SETSCHEDULER)
++#if 0
+ #if defined(HAVE_PTHREAD_SETSCHEDPARAM) && defined(HAVE_SCHED_GET_PRIORITY_MAX) && defined(HAVE_SCHED_SETSCHEDULER)
int res;
- sched_priority = sched_get_priority_max (SCHED_RR);
-@@ -1301,9 +1301,6 @@
- "Could not get maximum scheduler priority");
- sched_priority = 0;
- }
--#else
-- log_printf(LOGSYS_LEVEL_WARNING,
-- "The Platform is missing process priority setting features. Leaving at default.");
+@@ -1305,6 +1306,7 @@
+ log_printf(LOGSYS_LEVEL_WARNING,
+ "The Platform is missing process priority setting features. Leaving at default.");
#endif
++#endif
}
-Index: new/exec/timer.c
+ static void fplay_key_change_notify_fn (
+@@ -1585,6 +1587,11 @@
+ corosync_setscheduler ();
+ }
+
++ if (setpriority(PRIO_PGRP, 0, -20) < 0) {
++ fprintf(stderr, "setpriority failed\n");
++ return EXIT_FAILURE;
++ }
++
+ corosync_mlockall ();
+
+ log_printf (LOGSYS_LEVEL_NOTICE, "Corosync Cluster Engine ('%s'): started and ready to provide service.\n", VERSION);
+Index: new/exec/coroipcs.c
===================================================================
---- new.orig/exec/timer.c 2013-01-11 15:35:40.000000000 +0100
-+++ new/exec/timer.c 2013-01-11 15:35:46.000000000 +0100
-@@ -109,7 +109,7 @@
- int fds;
- unsigned long long timeout;
+--- new.orig/exec/coroipcs.c 2013-01-16 11:12:46.000000000 +0100
++++ new/exec/coroipcs.c 2013-01-16 11:13:40.000000000 +0100
+@@ -661,7 +661,7 @@
+ unsigned int new_message;
+ int sem_value = 0;
-#if defined(HAVE_PTHREAD_SETSCHEDPARAM) && defined(HAVE_SCHED_GET_PRIORITY_MAX)
+#if 0 && defined(HAVE_PTHREAD_SETSCHEDPARAM) && defined(HAVE_SCHED_GET_PRIORITY_MAX)
- if (sched_priority != 0) {
- struct sched_param sched_param;
+ if (api->sched_policy != 0) {
+ res = pthread_setschedparam (conn_info->thread,
+ api->sched_policy, api->sched_param);
+Index: new/exec/logsys.c
+===================================================================
+--- new.orig/exec/logsys.c 2013-01-16 11:15:29.000000000 +0100
++++ new/exec/logsys.c 2013-01-16 11:15:35.000000000 +0100
+@@ -1568,7 +1568,7 @@
+ return (0);
+ }
+-#if defined(HAVE_PTHREAD_SETSCHEDPARAM) && defined(HAVE_SCHED_GET_PRIORITY_MAX)
++#if 0 && defined(HAVE_PTHREAD_SETSCHEDPARAM) && defined(HAVE_SCHED_GET_PRIORITY_MAX)
+ if (wthread_active == 0) {
+ logsys_sched_policy = policy;
+ memcpy(&logsys_sched_param, param, sizeof(struct sched_param));