Date: Fri, 25 Mar 2011 08:14:47 -0400 From: John Baldwin <jhb@freebsd.org> To: freebsd-fs@freebsd.org Subject: Re: O_CLOEXEC Message-ID: <201103250814.47903.jhb@freebsd.org> In-Reply-To: <20110325005923.GI78089@deviant.kiev.zoral.com.ua> References: <20110325005923.GI78089@deviant.kiev.zoral.com.ua>
next in thread | previous in thread | raw e-mail | index | archive | help
On Thursday, March 24, 2011 8:59:24 pm Kostik Belousov wrote: > Hi, > below is the implementation of O_CLOEXEC flag for open(2). I also > handle the fhopen(2), since the man page states that fhopen(2) takes > the same flags as open(2), and it is more logical to change code > then man page. > > It is somewhat curious that SUSv4 did not specified O_CLOEXEC behaviour > for posix_openpt(). I left it out, but it probably makes sense to > allow O_CLOEXEC there ? > > The falloc() KPI is left as is because the function is often used > in the kernel and probably in the third-party modules. fdallocf() > takes additional flag argument to set close-on-exec before any other > thread might see new file descriptor. Hmm, I don't actually expect falloc() to be used in 3rd party modules and would be fine with just adding a new flags parameter to it. -- John Baldwin
Want to link to this message? Use this URL: <https://mail-archive.FreeBSD.org/cgi/mid.cgi?201103250814.47903.jhb>