Hi all,
I am trying to port one of my C: application from AIX to LINUX and this is a new linux box..and when i try to compile on LINUX for the following chunk of code it throws the afore said error.."undefined reference to 'getpri'" and the same code compiles very well in the AIX platform.
if (wrkpid != getpid() && (getpri(getpid()) != -1 || errno != ESRCH)) {
printf("Program already running - cancelling run %ld for %ld\n", getpid(), wrkpid);
exit(0);
}
i wanted to know am i missing any library in my box or can we use getpri() on linux box if we cannot any alternative function which checks for the running processes in the memory instance..
I tried using getpriority() doesnt really help as it returns the nice value. where as getpri() returns the scheduling priority.
THANKS in advance
Logic4fun
I am trying to port one of my C: application from AIX to LINUX and this is a new linux box..and when i try to compile on LINUX for the following chunk of code it throws the afore said error.."undefined reference to 'getpri'" and the same code compiles very well in the AIX platform.
if (wrkpid != getpid() && (getpri(getpid()) != -1 || errno != ESRCH)) {
printf("Program already running - cancelling run %ld for %ld\n", getpid(), wrkpid);
exit(0);
}
i wanted to know am i missing any library in my box or can we use getpri() on linux box if we cannot any alternative function which checks for the running processes in the memory instance..
I tried using getpriority() doesnt really help as it returns the nice value. where as getpri() returns the scheduling priority.
THANKS in advance
Logic4fun