[MERGE][#314247] Quick attempt at adding some EINTR-proofing to smart protocol code.
John Arbash Meinel
john at arbash-meinel.com
Wed Jan 7 03:31:05 GMT 2009
-----BEGIN PGP SIGNED MESSAGE-----
Hash: SHA1
Andrew Bennetts wrote:
> I saw <https://bugs.launchpad.net/bugs/314247>, which includes some failures due
> to EINTR occuring during recv calls. This patch just tries to compensate for
> that, and fixes osutils.sendall the same way.
>
> The new osutils.until_no_eintr function in this patch is taken verbatim from
> Twisted's twisted.python.util.untilConcludes function. Twisted is
> MIT-licensed, although the function is nearly trivial.
>
> -Andrew.
>
>
I would guess that doing:
if e.errno == errno.EINTR:
would fit more closely with the rest of bzr's code. I would guess
Twisted uses e.args[0] because of older versions of python. Though
perhaps it is something with different platform errors?
Otherwise this seems ok.
BB:tweak
John
=:->
-----BEGIN PGP SIGNATURE-----
Version: GnuPG v1.4.9 (Cygwin)
Comment: Using GnuPG with Mozilla - http://enigmail.mozdev.org
iEYEARECAAYFAklkIfkACgkQJdeBCYSNAAMFBgCgtcwNjh8OVddUeCs7tWLfba6e
FJYAnRI79Ta1F9oQzqwZZJAo1Rtq87H1
=9zTd
-----END PGP SIGNATURE-----
More information about the bazaar
mailing list