Yahoo Groups archive

Milter-greylist

Index last updated: 2026-04-28 23:32 UTC

Message

Re: [milter-greylist] libpthread: Invalid condition variable

2009-09-16 by Petar Bogdanovic

On Wed, Sep 16, 2009 at 11:04:33AM +0200, Petar Bogdanovic wrote:
> 
> But even if you want to do it right (through mg_init() which contains
> dump_init() and is in store.c):  The problem is that you have a
> chicken/egg situation here since conf_load() needs mg_init() (because of
> dump_init()) and mg_init() needs conf_load() (because of the conf
> struct).
> 
> I would suggest dropping pthread_cond_init() which is the only thing
> dump_init() actually does.  man pthread_cond_init() says:
> 
> 	``In cases where default condition variable attributes are
> 	  appropriate, the macro PTHREAD_COND_INITIALIZER can be used to
> 	  initialise condition variables that are statically allocated.
> 	  The effect is equivalent to dynamic initialisation by a call
> 	  to pthread_cond_init() with parameter attr specified as NULL,
> 	  except that no error checks are performed.''
> 
> Since dump.c already uses PTHREAD_MUTEX_INITIALIZER instead of
> pthread_mutex_init(), this would be consistent.

Patch:

	http://smokva.net/patch/milter-greylist-cond.diff

Attachments

Move to quarantaine

This moves the raw source file on disk only. The archive index is not changed automatically, so you still need to run a manual refresh afterward.