Skip site navigation (1)Skip section navigation (2)
Date:      Sat, 21 Jan 2012 10:26:04 +0200
From:      Kostik Belousov <kostikbel@gmail.com>
To:        Eitan Adler <lists@eitanadler.com>
Cc:        jilles@freebsd.org, FreeBSD Hackers <freebsd-hackers@freebsd.org>, Colin Percival <cperciva@freebsd.org>
Subject:   Re: dup3 syscall - atomic set O_CLOEXEC with dup2
Message-ID:  <20120121082604.GT31224@deviant.kiev.zoral.com.ua>
In-Reply-To: <CAF6rxgk5LEwvj_7WLk=WeuondJSSSNo2LBfZC7nqOkc5-c9YCw@mail.gmail.com>
References:  <CAF6rxg=EjkwFbXQt3i2Nnz6_dcZtdek-2YdqyZnAdVPxVaWR_Q@mail.gmail.com> <20120112100840.GV31224@deviant.kiev.zoral.com.ua> <CAF6rxgne7M9xBb-mM1xsjPy3r-O%2BO%2BMzuYrsweG849V83MX3mA@mail.gmail.com> <CAF6rxgn5uddFb4LOGb0E_OOpVMiFavOVHwnrKF7cFHb6tfrPjw@mail.gmail.com> <CAF6rxg=Xbh--nL3pebj=ra%2B09K%2BWJYen2JPVDWwR14%2BifG-_iQ@mail.gmail.com> <20120120235645.GP31224@deviant.kiev.zoral.com.ua> <CAF6rxgk5LEwvj_7WLk=WeuondJSSSNo2LBfZC7nqOkc5-c9YCw@mail.gmail.com>

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

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

On Fri, Jan 20, 2012 at 07:09:43PM -0500, Eitan Adler wrote:
> 2012/1/20 Kostik Belousov <kostikbel@gmail.com>:
> > On Fri, Jan 20, 2012 at 06:25:42PM -0500, Eitan Adler wrote:
> >> I figure this isn't wanted?
> > You silently ignored part of the notes that were provided,
>=20
> I fixed the style violations you pointed out and removed
> _SYS_SYSPROTO_H_ and friends.  Which else was there? If I missed
> something I'm sorry.
Manual definition of the struct dup3_args is not needed at all. I
very much doubt that patch can compile since there is now
duplicate definition of the structure.

There is still stray return (0);.

Another reason for the patch to not compile is compat32
syscalls.master changes.

The suggestion of 'it is better to test the presence of O_CLOEXEC
with & instead of comparing with =3D=3D, to allow for ease
introduction of future dup3 flags, if any.' is silently ignored.

Probably new: style requires putting opening '{' for the function
body at new line. There shall be no space between '*' and arg name.

New: symbols in the version map shall be ordered alphabetically.

>=20
> > and keep
> > complete silence on the primary question about non-standard
>=20
> I thought I answered that already but I'll try again: I believe the
> functionality is useful to developers even if it is non-standard. In
> addition if it is standardized at some point in the future it is
> unlikely to have different semantics than the ones implemented.
It very well may have different details that would force us to
draw two versions forever.

>=20
> > and fractional nature of the patch.
>=20
> How so? I am not including the generated parts in the patch. Should I?
The implementation is partial because dup3() is only part of the
Linux and glibc efforts to allow app authors to handle the race
between obtaining the file descriptor and setting cloexec flag. I
already pointed you to SOCK_CLOEXEC for example. This is ignored
as well.

dup3() alone is almost useless.
>=20
> > I see no reason to retype my previous response.
>=20
> --=20
> Eitan Adler

--5kuBRoVe25Cd17OM
Content-Type: application/pgp-signature
Content-Disposition: inline

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

iEYEARECAAYFAk8adpwACgkQC3+MBN1Mb4g5lgCdFU821OXnlHodGC4Vfx0OtRaq
IrsAoKup5DhgsBUaznSzYTl7n2RMpF6o
=/Mvv
-----END PGP SIGNATURE-----

--5kuBRoVe25Cd17OM--



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