SQLite Forum

Opening a DB with SQLITE_OPEN_EXCLUSIVE
Login
Why not just open() the file with the desired flags, save the result, and then do the SQLite open? Of course, you still have to have the same transaction to initialize the database in the case of a new file to deal with the same ultimate race conditions.