Skip site navigation (1)Skip section navigation (2)
Date:      Thu, 10 Jul 2014 15:52:53 +0200
From:      Baptiste Daroussin <bapt@FreeBSD.org>
To:        Konstantin Belousov <kostikbel@gmail.com>
Cc:        svn-src-head@freebsd.org, svn-src-all@freebsd.org, src-committers@freebsd.org
Subject:   Re: svn commit: r268493 - head/lib/libfetch
Message-ID:  <20140710135253.GA93051@ivaldir.etoilebsd.net>
In-Reply-To: <20140710132813.GQ93733@kib.kiev.ua>
References:  <201407101304.s6AD4rne079137@svn.freebsd.org> <20140710132813.GQ93733@kib.kiev.ua>

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

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

On Thu, Jul 10, 2014 at 04:28:13PM +0300, Konstantin Belousov wrote:
> On Thu, Jul 10, 2014 at 01:04:53PM +0000, Baptiste Daroussin wrote:
> > Author: bapt
> > Date: Thu Jul 10 13:04:52 2014
> > New Revision: 268493
> > URL: http://svnweb.freebsd.org/changeset/base/268493
> >=20
> > Log:
> >   Support EAGAIN in fetch_writev
> >  =20
> >   Reviewed by:	des
> >   Approved by:	des
> >=20
> > Modified:
> >   head/lib/libfetch/common.c
> >=20
> > Modified: head/lib/libfetch/common.c
> > =3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=
=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=
=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=
=3D=3D=3D=3D=3D
> > --- head/lib/libfetch/common.c	Thu Jul 10 12:41:58 2014	(r268492)
> > +++ head/lib/libfetch/common.c	Thu Jul 10 13:04:52 2014	(r268493)
> > @@ -1110,6 +1110,8 @@ fetch_writev(conn_t *conn, struct iovec=20
> >  			errno =3D 0;
> >  			pfd.revents =3D 0;
> >  			if (poll(&pfd, 1, deltams) < 0) {
> > +				if (errno =3D=3D EAGAIN)
> > +					continue;
> >  				if (errno =3D=3D EINTR && fetchRestartCalls)
> >  					continue;
> >  				return (-1);
>=20
> How is this error possible ? poll(2) converts EAGAIN from seltdwait(9)
> to no error.

For posix compliance, libfetch is not only used on FreeBSD, reading at:
http://pubs.opengroup.org/onlinepubs/009695399/functions/poll.html I can re=
ad:

[EAGAIN]
    The allocation of internal data structures failed but a subsequent requ=
est
    may succeed.

Am I missing something?

Bapt

--ew6BAiZeqk4r7MaW
Content-Type: application/pgp-signature

-----BEGIN PGP SIGNATURE-----
Version: GnuPG v2

iEYEARECAAYFAlO+mrUACgkQ8kTtMUmk6EzSZwCgm7nFamyduDHSejQXFMoTYpgf
WQkAn2+Vl5/4PGM7TRkkUx4CRsWo+LNE
=P4ab
-----END PGP SIGNATURE-----

--ew6BAiZeqk4r7MaW--



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