Re: [bug #43404] gl_locale_name_default() thread issues on OS X

2015-02-19 Thread Noah Misch
On Wed, Feb 18, 2015 at 12:33:11PM +0900, Daiki Ueno wrote: > At first, I thought that the implicit thread creation in CF and the > consequent crashes at fork() are a problem that we should avoid in > gnulib and libintl. > > However, according to this article: > http://objectivistc.tumblr.com/post

Re: [bug #43404] gl_locale_name_default() thread issues on OS X

2015-02-17 Thread Daiki Ueno
Noah Misch writes: > gl_locale_name_default() failure is relevant to a > libintl_setlocale(LC_x, "") locale change, though. Good point, right. >> Based on the approach taken by PostgreSQL, proposed by Noah Misch > > Incidentally, PostgreSQL decided not to do the fork. Instead, > PostgreSQL now

Re: [bug #43404] gl_locale_name_default() thread issues on OS X

2015-02-03 Thread Noah Misch
On Sat, Jan 31, 2015 at 04:58:52PM +0900, Daiki Ueno wrote: > Sorry for long delay. I've refreshed the patch. > > Changes from v1 are: This patch looks good. > Noah Misch writes: > >> + if (close (fd[1]) < 0) > >> +{ > >> + close (fd[0]); > >> + goto done; > > Though orthogona

Re: [bug #43404] gl_locale_name_default() thread issues on OS X

2015-01-30 Thread Daiki Ueno
Sorry for long delay. I've refreshed the patch. Changes from v1 are: - remove unnecessary heap usage in gl_locale_name_default_from_CoreFoundation - move pthread_is_threaded_np check from localename.m4 to intlmacosx.m4 - fix close() error handling as Noah pointed (see below) - handle EINTR for

Re: [bug #43404] gl_locale_name_default() thread issues on OS X

2014-10-15 Thread Noah Misch
On Tue, Oct 14, 2014 at 02:53:25PM +0900, Daiki Ueno wrote: > Pádraig Brady writes: > > You mentioned it would be conditionalized on pthread_is_threaded_np > > for performance I suppose, as threaded progs would already > > have to deal with the consequences of a separate thread. > > So races in pt

Re: [bug #43404] gl_locale_name_default() thread issues on OS X

2014-10-14 Thread Daiki Ueno
Pádraig Brady writes: >> Thanks for the comment. Here is a tentative patch based on the >> PostgreSQL patches. Perhaps it might require a copyright assignment >> from the original author (Cc'ed). > > Is AC_CHECK_FUNCS sufficient to find pthread_is_threaded_np()? > I.E. is LIB_PTHREAD required t

Re: [bug #43404] gl_locale_name_default() thread issues on OS X

2014-10-14 Thread Pádraig Brady
On 10/14/2014 06:53 AM, Daiki Ueno wrote: > Pádraig Brady writes: > >> There are many consequences to having multiple threads, >> so it's worth avoiding/isolating that where possible. >> >> You mentioned it would be conditionalized on pthread_is_threaded_np >> for performance I suppose, as thread

Re: [bug #43404] gl_locale_name_default() thread issues on OS X

2014-10-13 Thread Daiki Ueno
Pádraig Brady writes: > There are many consequences to having multiple threads, > so it's worth avoiding/isolating that where possible. > > You mentioned it would be conditionalized on pthread_is_threaded_np > for performance I suppose, as threaded progs would already > have to deal with the cons

Re: [bug #43404] gl_locale_name_default() thread issues on OS X

2014-10-13 Thread Pádraig Brady
On 10/13/2014 02:06 AM, Daiki Ueno wrote: > Hello, > > Forwarding to the mailing lists to get more feedback; the original > report can be found at . > > (I've changed the tracker configuration so that all reports will be sent > to the mailing list hereafter.)

Re: [bug #43404] gl_locale_name_default() thread issues on OS X

2014-10-12 Thread Daiki Ueno
Hello, Forwarding to the mailing lists to get more feedback; the original report can be found at . (I've changed the tracker configuration so that all reports will be sent to the mailing list hereafter.) Peter Eisentraut writes: > Something in libintl calls