summaryrefslogtreecommitdiff
path: root/src/passwd/getgr_r.c
diff options
context:
space:
mode:
authorRich Felker <dalias@aerifal.cx>2015-02-22 22:07:50 -0500
committerRich Felker <dalias@aerifal.cx>2015-02-22 22:07:50 -0500
commit8741ffe625363a553e8f509dc3ca7b071bdbab47 (patch)
treef917a4e8ce76450e2e956b051912cb9861fd9701 /src/passwd/getgr_r.c
parent102f6a01e249ce4495f1119ae6d963a2a4a53ce5 (diff)
downloadmusl-8741ffe625363a553e8f509dc3ca7b071bdbab47.tar.gz
fix pthread_cond_wait cancellation race
it's possible that signaling a waiter races with cancellation of that same waiter. previously, cancellation was acted upon, causing the signal to be consumed with no waiter returning. by using the new masked cancellation state, it's possible to refuse to act on the cancellation request and instead leave it pending. to ease review and understanding of the changes made, this commit leaves the unwait function, which was previously the cancellation cleanup handler, in place. additional simplifications could be made by removing it.
Diffstat (limited to 'src/passwd/getgr_r.c')
0 files changed, 0 insertions, 0 deletions