On Mon, Feb 28, 2011 at 8:36 AM, Paweł Hajdan, Jr.
<[email protected]>wrote:
>
> I remember a part of earlier discussion that there is a problem with
> journal and possibly other auxiliary files, i.e. we can't create/open them
> just based on one file descriptor.
>
Right. If you call sqlite3_open("xyzzy",...) then you end up opening
various files, including but no limited to "xyzzy", "xyzzy-journal",
"xyzzy-wal", and "xyzzy-shm".
> I'd need your advice on the above, i.e. assuming that the code can't call
> open directly (the call will fail because of the sandbox) but it can ask the
> browser process to open a file and send back a file descriptor.
>
> It is possible that instead of this entire xFdOpen thing that I suggested,
> it would be better to make it possible to pass a custom function used by
> sqlite instead of POSIX's open. In this case, that would roughly
> be PlatformBridge::databaseOpenFile.
>
Can't you simply compile the standard "sqlite3.c" amalgamated source file
using
-Dopen=openUsingPlatformBridge
and then implement a single function openUsingPlatformBridge() that does all
the necessary magic for you?
>
> Paweł Hajdan, Jr.
>
--
D. Richard Hipp
[email protected]
_______________________________________________
sqlite-users mailing list
[email protected]
http://sqlite.org:8080/cgi-bin/mailman/listinfo/sqlite-users