filedesc copying in fork()
xdivac02 at stud.fit.vutbr.cz
Sun Oct 1 09:35:36 PDT 2006
I am trying to implement CLONE_FS in linuxolator clone(). This flags
is used when we want the newly created thread share root/cwd/umask.
In FreeBSD we have a flags to fork1() RFFDG/RFCFDG. The first one
tells fork1() to copy the filedesc from old proc to the new one.
The later says we should create new filedesc struct. If neither
of these is given the filedesc struct is shared among the processes.
is my analysis correct?
currently in the linuxolator we dont set any of this flags passed to
fork1() ie. doing CLONE_FS semantics on default.
I am a little confused from linux behaviour because it seems to me
that they dont share open file descriptors betweeen processes after
fork() which is strange.
More information about the freebsd-emulation