Please check the manual page getpriority(2).