The test file will use a fork() whose child will open the db and lock it as above and sleep for some time before disconnecting (thus unlocking it). The parent will try to open the DB and hopefully be able to detect if locked or not.You're probably aware of that, but it bears repeating for other people that may find this thread that open SQLite connections don't handle fork() well. Kudos for getting it right and only opening the database after the fork()!
In reply to Re: Locking a SQLite DB for tests
by Anonymous Monk
in thread Locking a SQLite DB for tests
by bliako
| For: | Use: | ||
| & | & | ||
| < | < | ||
| > | > | ||
| [ | [ | ||
| ] | ] |