[Fontconfig] Fontconfig cache file update fails on Windows (also Cygwin)

Masamichi Hosoda trueroad at trueroad.jp
Thu Jan 12 00:50:43 UTC 2017

>    I'm going to guess that under posix, you should be able to update
> a file that you hold a read-write lock on.  That means under cygwin
> it should work.  Have you reported the bug to the cygwin people?

I've reported it.

> As for the MingGW case, you may have to find a way to lock access
> to the file in such a way as to prevent multiple updates AND
> allow update or writing.

I do not know whether that can be realized or not.

On MinGW, fontconfig deletes the cache before replacing it.

In other words, multiple updates are not prevented.
Anyway, replacing fails because locked files can not be deleted.

But, most Windows applications have their own fontconfig cache directories
unlike linux applicatons.
In this case, there is no conflict with other applications
even if without locking.

fontconfig 2.11.1 does not lock the cache while updating it.
It works fine on Windows.

More information about the Fontconfig mailing list