Le vendredi 30 novembre 2007 à 16:41 +0100, Bruno Haible a écrit :
> Yoann Vandoorselaere wrote:
> > The gl_recursive_lock_init() macro used for the pthread backend never
> > set the mutex attribute to be recursive. The end result is that a
> > 'standard' mutex is created, which will deadlock on recursive use. A
> > patch is attached that fixes this issue.
> 
> Indeed. Thanks for the patch. Instead of a macro with a large expansion,
> let me create an auxiliary function in lock.c. I'm applying the patch below.
> 
> > Additionally, lock.h make use of the abort() function, which can be a
> > problem if the application / library handle pthread error in a specific
> > way. Is that done on purpose, or are you interested in a patch?
> 
> It was done out of laziness, and because I don't know what a better handling
> of pthread_* function failures could look like. What do you propose?

Any reason why you don't simply return error values returned by
pthread_* functions (which should set errno appropriately), and let the
caller possibly handle it?

-- 
Yoann Vandoorselaere | Responsable R&D / CTO | PreludeIDS Technologies
Tel: +33 (0)8 70 70 21 58                  Fax: +33(0)4 78 42 21 58
http://www.prelude-ids.com



Reply via email to