Re: file offset pointer accross fork() ?

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

 



On Fri, 30 Sep 2005 00:04:00 +0200
Sebastian Skar <sebastianskar@xxxxxxxxx> wrote:
> hmm...
> what's the user-perspective difference between forking and threading,
> regarding open files, then ?

File descriptor sharing? For threads (and processes created with
CLONE_FILES) the fd's are shared as part of the common files_struct:
closing an fd in a thread makes that file descriptor go away for all
other threads while in the fork() case it is only released in the
calling process.

--
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