#include
<
stdio.h
>
#include
<
unistd.h
>
int
main ( )

...
{
printf ("The process ID is %d ", (int) getpid ()) ; //本进程
printf ("The parent process ID is %d ", (int) getppid ()) ; //父进程
return 0 ;
}