#include <stdio.h>
#include <unistd.h>
int main ()
{
printf ("The process id is %d\n", (int) getpid ());
printf ("The parent process id is %d\n", (int) getppid ());
return 0;
}
if you invoke it every time from the same shell, the parent process ID (that is, the process ID of the shell process) is the same.