Hello Eduardo, We do (succesfully) use sqlite in a similar manner as you describe in your post but the code ensures the DB is opened in each individual child process *after* a child is successfully forked. It is not a good idea to carry open database connection across the fork (or any other open file descriptor for that matter).
Cheers Pavlos On 7 January 2013 09:22, Eduardo Morras <emorr...@yahoo.es> wrote: > > Hi, I use sqlite in some of my projects. In one it follows a > parent/multichild model (multifork). The database is managed by the parent, > open close backups etc, opened before the fork, and after it the childs use > the database connection. I don't want to corrupt the database, but the > documentation only talks about the use with threads. I use a version > compiled with -DSQLITE_THREADSAFE=1 and shared_cache mode on setted by > parent before open db. > > The app works but, is anyone working with sqlite this way? Any advice to > avoid db corrupts, deadlocks, whatever? Please, don't talk about changing > to multithread model, i don't want to use them for this project. > > > Thanks > > --- --- > Eduardo Morras <emorr...@yahoo.es> > _______________________________________________ > sqlite-users mailing list > sqlite-users@sqlite.org > http://sqlite.org:8080/cgi-bin/mailman/listinfo/sqlite-users > -- Pavlos Christoforou Point Nine Financial Technologies Ltd Mobile: +44 (0)20 7193 5843 pavlos.christofo...@p9ft.com _______________________________________________ sqlite-users mailing list sqlite-users@sqlite.org http://sqlite.org:8080/cgi-bin/mailman/listinfo/sqlite-users