I'd like to add an equivalent of fdopen to the sqlite's VFS (
http://www.sqlite.org/c3ref/vfs.html). The signature would similar to this:

int (*xFdOpen)(sqlite3_vfs*, int fd, sqlite3_file*, int flags, int
*pOutFlags);

This would be needed to cleanly implement fd-passing in Chromium, from
the browser to the sandboxed renderer process.

I was writing about this earlier, see below (all link to the same thread):
http://old.nabble.com/upstreaming-Chromium-patches-for-file-handle-passing-support-td29547456.html
http://permalink.gmane.org/gmane.comp.db.sqlite.general/59066
http://sqlite.org:8080/cgi-bin/mailman/private/sqlite-users/2010-August/023922.html

One of the problems with just copy-pasting the os_unix.c code to our WebKit
port was that the changes to os_unix.c made between 3.6.x and 3.7.x were not
so trivial to apply (parts of the code were removed to reduce the amount of
code from ~5000 LOC to ~1000 LOC, and it was re-formatted to match WebKit
style). The change has been reverted anyway for unrelated reasons, but I
started thinking about trying to solve it in sqlite.

If we had an fdopen-like call in sqlite's VFS (and I'm willing to implement
it), the functionality needed for Chromium could be implemented very
cleanly. What do you think about that?
_______________________________________________
sqlite-users mailing list
sqlite-users@sqlite.org
http://sqlite.org:8080/cgi-bin/mailman/listinfo/sqlite-users

Reply via email to