#include<stdio.h>
#include<unistd.h>
#include <stdlib.h>
int main()
{
printf("The PID of this process is %d\n",getpid()); /*获得当前进程的进程ID*/
printf("The PPID of this process is %d\n",getppid()); /*其父进程ID*/
return 0;
}
#include<stdio.h>
#include<unistd.h>
#include <stdlib.h>
int main()
{
printf("The PID of this process is %d\n",getpid()); /*获得当前进程的进程ID*/
printf("The PPID of this process is %d\n",getppid()); /*其父进程ID*/
return 0;
}