Process is a program in execution. Process execution must progress in sequential fashion. A process includes program counter, stack, and data section. In UNIX, a process is created by fork() system call. Below is the main fork() program based on C language.
pid_t pid = fork();
if (pid < 0)
fprintf(stderr,"error forking childn");
else if (pid == 0)
/* put your application here*/
/*wait for child process to complete*/
/*when child process has been completed, */
/*it will return status 0 */
You may download a sample application to count fibonacci sequence that uses fork() system call, 3.5_fork.zip.