[keven@localhost systemCall]$ cat set_process_information.c
LUPA开源社区n7p6Y
but#include <stdio.h>
C(?:G0?d"yn0#include <unistd.h>
LUPA开源社区+w%w~@7n;X^0F#include <sys/resource.h>
SIm(xh p yG hypI0LUPA开源社区'\k+t9N"Oint main(/*int argc,char **argv*/)
LUPA开源社区b0LsLO/Pis
h M2E*e{
LUPA开源社区2UKJ8A&q1~}okK
O printf("This process's priotity is:%d",getpriority(PRIO_PROCESS,getpid()));
LUPA开源社区;x^
_S:W(u-` nice(10);
LUPA开源社区8mclPJ printf("\nafter nice(10),This process's priority is:%d",getpriority(PRIO_PROCESS,getpid()));
.[;^0a9C7^4^aWCZ0 printf("\nThis process's gid is:%d",getpgid(getpid()));
LUPA开源社区*R$}-U/Nl6EG(km printf("\nThis process's current priority is:%d",getpriority(PRIO_PROCESS,getpid()));
#BmO&}msy-G-l0 setpriority(PRIO_PROCESS,getpid(),11);
LUPA开源社区*lX%\x2` c+B:q printf("\nthe modify process priority is %d\n",getpriority(PRIO_PROCESS,getpid()));
LUPA开源社区dk)XEuLF return 0;
+M!M0g!f[lz|0}
;N;w\d^:`%zW~mp8s0[keven@localhost systemCall]$ ./set_process_information
LUPA开源社区\5ra lII!K-h-[X~This process's priotity is:0
LUPA开源社区-XTH2HKafter nice(10),This process's priority is:10
g!~W0THp:b0This process's gid is:6201
LUPA开源社区9W"WuAOThis process's current priority is:10
Uw iK*WFS0the modify process priority is 11
LUPA开源社区9kSUY%]d9ZxE[keven@localhost systemCall]$
0S^wh7}'lL|0LUPA开源社区WB)hm`k:mc