Date: Sun, 1 Oct 2006 18:35:32 +0200 From: Divacky Roman <xdivac02@stud.fit.vutbr.cz> To: hackers@freebsd.org Cc: emulation@freebsd.org Subject: filedesc copying in fork() Message-ID: <20061001163532.GA39376@stud.fit.vutbr.cz>
next in thread | raw e-mail | index | archive | help
hi 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. comments? roman ---------------------- www.liberalnistrana.cz
Want to link to this message? Use this URL: <https://mail-archive.FreeBSD.org/cgi/mid.cgi?20061001163532.GA39376>