Re: [sqlite] sqlite & multi process usage

2014-07-18 Thread Howard Chu
Richard Hipp wrote: On Thu, Jul 17, 2014 at 5:10 AM, Micka wrote: Well, All of my process are using Mutex to protect sqlite from concurrent access. What kind of mutex are you using that works across processs? All the mutexes I know about only work for a single process. pthreads supports

Re: [sqlite] sqlite & multi process usage

2014-07-18 Thread Micka
Sorry, I mean semaphore => sem_open(pszSemaphoreName, O_CREAT, S_IRWXU | S_IRWXG | S_IRWXO, 0); On Fri, Jul 18, 2014 at 11:45 AM, Richard Hipp wrote: > On Thu, Jul 17, 2014 at 5:10 AM, Micka wrote: > > > Well, > > > > All of my process are using Mutex to protect sqlite from concurrent > access

Re: [sqlite] sqlite & multi process usage

2014-07-18 Thread Richard Hipp
On Thu, Jul 17, 2014 at 5:10 AM, Micka wrote: > Well, > > All of my process are using Mutex to protect sqlite from concurrent access. > What kind of mutex are you using that works across processs? All the mutexes I know about only work for a single process. -- D. Richard Hipp d...@sqlite.org

Re: [sqlite] sqlite & multi process usage

2014-07-17 Thread Simon Slavin
On 17 Jul 2014, at 10:10am, Micka wrote: > Well, > > All of my process are using Mutex to protect sqlite from concurrent access. > > That why I don't understand why I get SQLITE_BUSY error . > > Micka, > > > On Tue, Jul 8, 2014 at 11:44 PM, Simon Slavin wrote: > >> Have you set a timeout

Re: [sqlite] sqlite & multi process usage

2014-07-17 Thread Micka
Well, All of my process are using Mutex to protect sqlite from concurrent access. That why I don't understand why I get SQLITE_BUSY error . Micka, On Tue, Jul 8, 2014 at 11:44 PM, Simon Slavin wrote: > > On 8 Jul 2014, at 8:39pm, Micka wrote: > > > i'm using sqlite in different process. Som

Re: [sqlite] sqlite & multi process usage

2014-07-08 Thread Simon Slavin
On 8 Jul 2014, at 8:39pm, Micka wrote: > i'm using sqlite in different process. Sometimes I got the error Busy ... => > > When SQLite tries to access a file that is locked by another process, the > default behavior is to return SQLITE_BUSY. > > > So how can I prevent that ? Have you set a ti

[sqlite] sqlite & multi process usage

2014-07-08 Thread Micka
Hi, i'm using sqlite in different process. Sometimes I got the error Busy ... => When SQLite tries to access a file that is locked by another process, the default behavior is to return SQLITE_BUSY. So how can I prevent that ? you said : When any process wants to write, it must lock the entire