From 163dd719cc676aaaebf77d7fceb86cc8d6dc55ff Mon Sep 17 00:00:00 2001 From: Leland Lucius Date: Tue, 7 Jul 2020 14:12:33 -0500 Subject: [PATCH] AUP3: Use the "unix-excl" VFS on Linux and Mac --- src/ProjectFileIO.cpp | 10 ++++++++++ 1 file changed, 10 insertions(+) diff --git a/src/ProjectFileIO.cpp b/src/ProjectFileIO.cpp index d732fc648..7d9f4de0a 100644 --- a/src/ProjectFileIO.cpp +++ b/src/ProjectFileIO.cpp @@ -205,6 +205,16 @@ void ProjectFileIO::Init( AudacityProject &project ) // This step can't happen in the ctor of ProjectFileIO because ctor of // AudacityProject wasn't complete mpProject = project.shared_from_this(); + +#if !defined(__WXMSW__) + // Use the "unix-excl" VFS to make access to the DB exclusive. This gets + // rid of the "-shm" shared memory file. + auto vfs = sqlite3_vfs_find("unix-excl"); + if (vfs) + { + sqlite3_vfs_register(vfs, 1); + } +#endif } ProjectFileIO::~ProjectFileIO()