Hash: SHA1

On 07/12/2010 12:07 PM, Eric Smith wrote:
> I don't think the devs would complain about that.  "This code has too
> few lines!"

They also have to have signed paper copies dedicating the code to public
domain and acknowledging the right to do so.  That is far more work than
just reimplementing it in the same coding style as the rest of SQLite, not
to mention testing etc.  (My test code is in Python, theirs is in TCL.)

>> and it is an open issue as to how you report the cross fork usage should 
>> it happen.  (In my case I know Python is being used.)  
> I didn't look at it deeply, but out of curiosity: what's wrong with just 
> returning (or causing SQLite to return) a standard unhappy return code?  

Because that isn't sufficient.  For example sqlite3_mutex_leave returns void
and that makes sense normally.  But a mutex could be acquired then a fork
happens in which case you want the release in the child process to be VERY
upset.  Similarly sqlite3_mutex_enter returns void for similar reasons - it
cannot fail, just block.

About the only correct thing to do in a process using SQLite through a fork
is to terminate the process.  (Even then that could mess with locks
depending on how the operating systems deals with it - POSIX locks are insane.)

Version: GnuPG v1.4.10 (GNU/Linux)
Comment: Using GnuPG with Mozilla - http://enigmail.mozdev.org/

sqlite-users mailing list

Reply via email to