1. 程式人生 > >linux下的四個簡單函式介紹 getpid getppid getuid getgid

linux下的四個簡單函式介紹 getpid getppid getuid getgid


[[email protected] learn_c]$ su root
Password: 
[[email protected] learn_c]# echo &&

> ^C
[[email protected] learn_c]# id
uid=0(root) gid=0(root) groups=0(root),1(bin),2(daemon),3(sys),4(adm),6(disk),10(wheel)
[[email protected] learn_c]# ./a.out 
pid:2922, ppid:2905, uid:0, gid:0