When referring to process IDs in a C or C++ program, always use the pid_t typedef, which is defined in <sys/types.h>.A program can obtain the process ID of the process it’s running in with the getpid() system call, and it can obtain the process ID of its parent process with the getppid() system call. For instance, the program in Listing 3.1 prints its process ID and its parent’s process ID. 1: // Printing the process ID and parent process ID 2: #include <stdio.h> 3: #include <unistd.h> 4: int main () 5: { 6: printf (“The process ID is %d\n”, ( int ) getpid ()); 7: printf (“The parent process ID is %d\n”, ( int ) getppid ()); 8: return 0; 9: } fork When a program calls fork, a duplicate process, called the child process , is created. The parent process continues executing the program from the point that fork was called. The child process, too, executes the same program from the same place. So how do the two processes differ