Bug 12947

Summary: Incorrect return value of FcAtomicLock
Product: fontconfig Reporter: David <ssdk>
Component: libraryAssignee: Keith Packard <keithp>
Status: RESOLVED FIXED QA Contact:
Severity: normal    
Priority: medium    
Version: 2.4   
Hardware: All   
OS: All   
Whiteboard:
i915 platform: i915 features:

Description David 2007-10-26 01:18:16 UTC
The description of the function FcAtomicLock states: "Returns FcFalse if the file is locked by another process, else returns FcTrue and leaves the file locked.". So if we try to lock the file for the second time from the same process the function should return FcTrue.

However the implementation of the function FcAtomicLock returns FcFalse in this case.




The detailed bug description can be found at: 

http://linuxtesting.org/results/report?num=S0590
Comment 1 Keith Packard 2007-11-03 13:06:35 UTC
The documentation is inaccurate; FcAtomicLock should only be invoked once by any process. I've changed it to read:

Attempts to lock the file referenced by <parameter>atomic</parameter>.
Returns FcFalse if the file is already locked, else returns FcTrue and
leaves the file locked.

910db318ae67693f7bc17f0bdc61caaf555365ae

Use of freedesktop.org services, including Bugzilla, is subject to our Code of Conduct. How we collect and use information is described in our Privacy Policy.