> On Jan 23, 2019, at 8:27 AM, Carsten Müncheberg > <carsten.muencheb...@gmail.com> wrote: > > A host application (which is a black box for me I cannot change) is loading > my plugin binaries which each have SQLite linked statically. When two > plugins now access the same database file from the process of the host > application none of the serialization mechanisms (file lock, mutex) works, > and my database file will get corrupted eventually.
Build SQLite as a dynamic library, and link each of your plugins with it dynamically. (You may need an installation process that copies the SQLite library to a known location where each plugin can find it.) Then there’s only one instance of SQLite, and locking should work properly. (And if the platform is macOS or iOS, consider using the built-in system copy of SQLite instead of your own; that makes it even easier.) —Jens _______________________________________________ sqlite-users mailing list sqlite-users@mailinglists.sqlite.org http://mailinglists.sqlite.org/cgi-bin/mailman/listinfo/sqlite-users