On Mon, Jul 12, 2010 at 02:47:19PM -0700, Roger Binns wrote:
> About the only correct thing to do in a process using SQLite through a fork
> is to terminate the process.

You can return an error to the caller too.  Of course, if you're using
the mutex functions to do this then it's too late, so you have to
abort().  But if this were integrated into libsqlite3 then the entry
points could return an error.

That said, it's better to abort() as the error could be ignored by the
caller and this kind of error is so serious that it should be discovered
as soon as possible (it's hard to ignore an abort()).

>                               (Even then that could mess with locks
> depending on how the operating systems deals with it - POSIX locks are 
> insane.)

They're insane (the _first_, not last, fildes close(2) in a process
drops all locks on the underlying file), but the child won't clobber the
parent's locks.

sqlite-users mailing list

Reply via email to