![](https://i-blog.csdnimg.cn/blog_migrate/8f900a89c6347c561fdf2122f13be562.gif)
![](https://i-blog.csdnimg.cn/blog_migrate/961ddebeb323a10fe0623af514929fc1.gif)
#include <stdio.h> #include <process.h> #include <sys/types.h> int main() { pid_t pid; pid = getpid(); printf("%d\n" ,pid); getchar(); }
#include <stdio.h> #include <process.h> #include <sys/types.h> int main() { pid_t pid; pid = getpid(); printf("%d\n" ,pid); getchar(); }
转载于:https://www.cnblogs.com/cenguanliang/p/5430105.html