Re: fork system call

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

 



fork creates a new process which initially shares everything with the parent(excluding the task struct), as soon as on of the processes tries to write to any shared page it(the page) is duplicated and separate copies are given to each process.

Thanks
Sri 


On Mon, Dec 29, 2008 at 1:49 AM, Shyam Burkule <shyam.burkule@xxxxxxxxx> wrote:
Hello,
I am sorry for asking silly question.

       In windows basic execution unit is thread, and Linux does not differentiate between thread and process( I mean Linux doesn't give special treatment for thread essentially they are normal process except they share some resource with other process).   If I use fork to create process, does it create thread that run in the same thread group as parent run or does it create another standalone process?

Fork system call is equivalent to clone(SIGCHLD,0, so I think fork create new standalone process.

Please clarify.

~Shyam



--
SK Malik

[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