#else /* no AIX */
#if HAVE_SCHED_SETSCHEDULER
struct sched_param p;
+ int policy = SCHED_FIFO;
p.sched_priority = 1;
- if (sched_setscheduler(0, SCHED_FIFO, &p) == -1) {
+#ifdef SCHED_RESET_ON_FORK
+ policy |= SCHED_RESET_ON_FORK;
+#endif
+ if (sched_setscheduler(0, policy, &p) == -1) {
DEBUG(DEBUG_CRIT,("Unable to set scheduler to SCHED_FIFO (%s)\n",
strerror(errno)));
} else {
#endif
#else /* no AIX */
#if HAVE_SCHED_SETSCHEDULER
+#ifndef SCHED_RESET_ON_FORK
struct sched_param p;
p.sched_priority = 0;
}
#endif
#endif
+#endif
}
void set_nonblocking(int fd)