On Mon, Mar 24, 2008 at 3:58 PM, <[EMAIL PROTECTED]> wrote: > "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()...
I have new question. Is it save to close SQLite database at child process or I should close it exactly before fork()? -- Alexander Batyrshin aka bash bash = Biomechanica Artificial Sabotage Humanoid _______________________________________________ sqlite-users mailing list sqlite-users@sqlite.org http://sqlite.org:8080/cgi-bin/mailman/listinfo/sqlite-users