Skip site navigation (1)Skip section navigation (2)
Date:      Fri, 25 Mar 2011 14:34:22 +0200
From:      Kostik Belousov <kostikbel@gmail.com>
To:        John Baldwin <jhb@freebsd.org>
Cc:        freebsd-fs@freebsd.org
Subject:   Re: O_CLOEXEC
Message-ID:  <20110325123422.GK78089@deviant.kiev.zoral.com.ua>
In-Reply-To: <201103250814.47903.jhb@freebsd.org>
References:  <20110325005923.GI78089@deviant.kiev.zoral.com.ua> <201103250814.47903.jhb@freebsd.org>

next in thread | previous in thread | raw e-mail | index | archive | help

--1Dj2YR7i9IjIuF3W
Content-Type: text/plain; charset=us-ascii
Content-Disposition: inline
Content-Transfer-Encoding: quoted-printable

On Fri, Mar 25, 2011 at 08:14:47AM -0400, John Baldwin wrote:
> 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.
> >=20
> > 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 ?
> >=20
> > 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.
>=20
> Hmm, I don't actually expect falloc() to be used in 3rd party modules and=
=20
> would be fine with just adding a new flags parameter to it.

The calls to falloc() appear in such modules as cryptodev(4).
I do not mind changing falloc interface, but I also intend to merge
O_CLOEXEC to stable/8. Are you fine with merging your suggestion to
stable branch, while falloc() is called from cryptodev, zlib,
linux (later is not a big issue if I bump __FreeBSD_version) ?

--1Dj2YR7i9IjIuF3W
Content-Type: application/pgp-signature
Content-Disposition: inline

-----BEGIN PGP SIGNATURE-----
Version: GnuPG v1.4.11 (FreeBSD)

iEYEARECAAYFAk2Mi80ACgkQC3+MBN1Mb4gHIACfRPFmuiXAcZZopBtLG5yJIaLS
zGAAn0oG3gmcpbPkQHH1unLp0R6bjpba
=f6IE
-----END PGP SIGNATURE-----

--1Dj2YR7i9IjIuF3W--



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