Date: Sat, 23 Jan 2010 21:38:35 +0200 From: Kostik Belousov <kostikbel@gmail.com> To: Hajimu UMEMOTO <ume@freebsd.org> Cc: attilio@freebsd.org, Gabor Kovesdan <gabor@freebsd.org>, current@freebsd.org Subject: Re: NLS/strerror efficiency Message-ID: <20100123193834.GM59590@deviant.kiev.zoral.com.ua> In-Reply-To: <yge1vhgvdd3.wl%ume@mahoroba.org> References: <20100119212019.GL59590@deviant.kiev.zoral.com.ua> <4B56CACF.50508@FreeBSD.org> <yge1vhgvdd3.wl%ume@mahoroba.org>
next in thread | previous in thread | raw e-mail | index | archive | help
--L9+4a/fGFceRH8Zi Content-Type: text/plain; charset=us-ascii Content-Disposition: inline Content-Transfer-Encoding: quoted-printable On Sun, Jan 24, 2010 at 04:18:48AM +0900, Hajimu UMEMOTO wrote: > Hi, >=20 > >>>>> On Wed, 20 Jan 2010 10:20:15 +0100 > >>>>> Gabor Kovesdan <gabor@FreeBSD.org> said: >=20 > gabor> El 2010. 01. 19. 22:20, Kostik Belousov escribi?$(D+Q: > > Hi, > > r189765 enabled NLS support for libc. Now, any strerror(3) call causes > > 4 (!) failing stat(2) calls. I think this is untolerable. > > > > Catopen() does not cache the catalog descriptor, at least for libc, > > at least for the case where the open failed. > > =20 > gabor> Hi Kostik, >=20 > gabor> thank you for pointing this out. I'll check the code to see how we= could=20 > gabor> add a caching for the failing catalogs. I'll post the patch here w= hen=20 > gabor> I'm done. >=20 > The gai_strerror(3) has same issue. How about the attached patch in > this mail? Wouldn't this cause the locale for error strings to be fixated at the time of the first strerror/gai_strerror call ? Current code, despite it inefficiency, allow dynamic change of locale that is reflected in strerror() output, I believe. --L9+4a/fGFceRH8Zi Content-Type: application/pgp-signature Content-Disposition: inline -----BEGIN PGP SIGNATURE----- Version: GnuPG v1.4.10 (FreeBSD) iEYEARECAAYFAktbUDoACgkQC3+MBN1Mb4jDgQCg8gfoCrHpPesz7cSd4mM+zSOU tZkAoIAwNUre6ZZrBuIH04Rt+EMY7iDI =jAbQ -----END PGP SIGNATURE----- --L9+4a/fGFceRH8Zi--
Want to link to this message? Use this URL: <https://mail-archive.FreeBSD.org/cgi/mid.cgi?20100123193834.GM59590>