"Alexander Batyrshin" <[EMAIL PROTECTED]> wrote:
> Hello,
> Is it safe to use this algorithm:
> 
> open_db
> fork()
> sql_do() // both parent and child executes sql statements
> close_db
> 
> I am not familiar with locking mechanism and I am afraid that if
> parent and child will use the same DB handlers it can cause of DB
> corruptions....
> 

It is not safe to carry an open SQLite database connection
across a fork.  The documentation says this somewhere, IIRC,
but I don't remember exactly where.  I should probably state
this fact in the documentation for sqlite3_open()...

--
D. Richard Hipp <[EMAIL PROTECTED]>

_______________________________________________
sqlite-users mailing list
sqlite-users@sqlite.org
http://sqlite.org:8080/cgi-bin/mailman/listinfo/sqlite-users

Reply via email to