At 3:53 PM -0600 1/4/06, Aaron Laffin wrote:
On 1/4/06, Peter Bierman <[EMAIL PROTECTED]> wrote:
 Related to a project I'm working on, it would be useful for me to be
 able to open a database file via passing an already open file
 descriptor to the sqlite open() call. sqlite3_openfd().

It seems to me that this would cause problems with the creation of the
journal file.  SQLite places it in the same directory as the db file
and it is transient.  SQLite wouldn't know where to put it if all it
had were a file descriptor for the main db file.  It also wouldn't
know where to find it for a potential rollback on open.  The design
scheme of the journal would have to change to support this.


Hmm, good point. Perhaps I could also pass the fd of the journal (if I find one)?

I really want to separate the privileged operations I need to perform from the bulk of my code. (This is for a setuid program.) The privileged operations I need to perform are fairly minimal.

-pmb

Reply via email to