Re: What is the practical significance of fork

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

 



On 12/15/2010 01:01 PM, Chaitannya Mahatme wrote:
Hello Everyone,

I tried finding answer to this question in many books but never quite
got a satisfactory answer to this question.

A fork process would replicate it parent, my question is

   1. Why is fork necessary to create a process. Why replicate a
      existing process before creating a new process.

That is not the only thing fork is used for.

Type "pstree" on any server system, and you will typically
see multiple instances of the same server, for example the
kernelnewbies.org server has this right now:

     ââhttpdâââ11*[httpd]
     â       ââhttpdâââ4*[python]

In this case, you can see that the parent httpd process
forked off 12 children, one of which forked off 4 python
processes (the fcgi moinmoin instances).


The question on how to avoid duplicating the entire process
before exec has been answered elsewhere in the thread :)


--
To unsubscribe from this list: send an email with
"unsubscribe kernelnewbies" to ecartis@xxxxxxxxxxxx
Please read the FAQ at http://kernelnewbies.org/FAQ



[Index of Archives]     [Newbies FAQ]     [Linux Kernel Mentors]     [Linux Kernel Development]     [IETF Annouce]     [Git]     [Networking]     [Security]     [Bugtraq]     [Yosemite]     [MIPS Linux]     [ARM Linux]     [Linux RAID]     [Linux SCSI]     [Linux ACPI]
  Powered by Linux