Skip site navigation (1)Skip section navigation (2)
Date:      Mon, 2 Oct 2006 12:51:15 -0400
From:      John Baldwin <jhb@freebsd.org>
To:        freebsd-hackers@freebsd.org
Cc:        emulation@freebsd.org, Divacky Roman <xdivac02@stud.fit.vutbr.cz>, hackers@freebsd.org
Subject:   Re: filedesc copying in fork()
Message-ID:  <200610021251.16453.jhb@freebsd.org>
In-Reply-To: <20061001163532.GA39376@stud.fit.vutbr.cz>
References:  <20061001163532.GA39376@stud.fit.vutbr.cz>

next in thread | previous in thread | raw e-mail | index | archive | help
On Sunday 01 October 2006 12:35, Divacky Roman wrote:
> 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? 

I believe so.

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

I have no idea on this one.

-- 
John Baldwin



Want to link to this message? Use this URL: <https://mail-archive.FreeBSD.org/cgi/mid.cgi?200610021251.16453.jhb>