/* Quick hack program to allow putting a process into SCHED_IDLE * Daniel Hiltgen (dhiltgen@toocool.calpoly.edu) * 01/20/99 */ #include #include #include int main(int argc, char* argv[]){ int i = 0; int a; struct sched_param param; param.sched_priority = 0; if ( argc <= 1 ) return 0; /* 3 is the magic number for SCHED_IDLE * * The C library does not look at the kernel headers * so the new #define is not visable by this program */ if ( sched_setscheduler(0,3, ¶m)) printf("\n\nError setting scheduler! %i \n\n",errno); execvp(argv[1],&argv[1]); return 0; /* Never called */ }