linux下的四个简单函数介绍:getpid, getppid, getuid, getgid_getpid,getuid-CSDN博客

网站介绍:直接看程序:#include int main(){ printf("pid:%d, ppid:%d, uid:%d, gid:%d\n", getpid(), getppid(), getuid(), getgid()); return 0;} 结果为: [taoge@localhost learn_c]$ echo $$2774[taoge@localh_getpid,getuid