[collectd] [PATCH] Bugfix: correctly handle spurious wakeups in pthread_cond_timedwait

Florian Forster octo at verplant.org
Wed Feb 10 12:22:10 CET 2010

Hi Michael,

On Sat, Feb 06, 2010 at 04:22:16PM +0100, Michael Stapelberg wrote:
> The problem was that pthread_cond_timedwait was used to sleep for a
> specific amount of time. However, spurious wakeups may happen and thus
> pthread_cond_timedwait may return without the timeout having actually
> passed.

thanks for the patch :) I've applied it to the collectd-4.8 branch, so
the next patch releases will include this fix.

I've done a minor modification: Rather than using "bool" I've changed
the "timeout_reached" to return "_Bool" which is a basic data type in

Florian octo Forster
Hacker in training
GnuPG: 0x91523C3D
-------------- next part --------------
A non-text attachment was scrubbed...
Name: not available
Type: application/pgp-signature
Size: 189 bytes
Desc: Digital signature
Url : http://mailman.verplant.org/pipermail/collectd/attachments/20100210/174fedc3/attachment.pgp 

More information about the collectd mailing list