What is the main function of fork() in CGI programming?

What is the main function of fork() in CGI programming?



- The fork() is used to create a child process and it returns the process identification number to the parent.

- Child process in this case gets a copy of the variables or the subroutines that are used by the parents.

- Child process if makes any modification then it gets discarded during the termination of the process and it doesn’t affect the parent process.

unless (fork) {
exec ("command");
}
wait;
Post your comment