Re: file offset pointer accross fork() ?

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

 



Hello....

> hmm...
> what's the user-perspective difference between forking and threading,
> regarding open files, then ?

IIRC nothing. The reason is, both normal fork() and thread creation, 
which essentially calls clone(), use CLONE_FS that duplicate pointer of 
file_struct. So, unless you directly call clone() without CLONE_FS, you 
will get same result regarding open files structures

Hope it helps

regards

Mulyadi


--
Kernelnewbies: Help each other learn about the Linux kernel.
Archive:       http://mail.nl.linux.org/kernelnewbies/
FAQ:           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