Skip to content

gthread: fix minor errno problem in GCond

The return value from g_cond_wait_until() is calculated, based on the value of errno after reacquiring the mutex. This is a problem because errno can be overwritten in the case the mutex is contended (in which case the slow-path code will re-enter the kernel).

Perform the calculation before reacquiring the mutex.

See merge request !958 (merged)


Trivial backport of !958 (merged) to glib-2-60.

Merge request reports