Database left unlocked by Tcl bindings

Eric J eric at
Sun Feb 21 13:15:25 GMT 2016

I discovered, while trying to set up Tcl bindings for Notmuch
(, which uses Xapian, that flintlock was not
being locked (I had lost updates).

I then found that opening a Xapian database for writing directly via
the Xapian Tcl bindings also silently fails to lock flintlock.

I have taken a copy of to play with, and I find that it
locks the file when called from a minimal C main program, but not when
bound as a Tcl extension.

What happens is that fcntl with F_SETLK fails to get the lock, but
reports success.

If anyone is using the Tcl bindings you might need to be aware of this.
Has anyone seen this with the Tcl (or any other) bindings? (Or indeed
in any other context?)


ms fnd in a lbry

More information about the Xapian-discuss mailing list