If I have a daemon type program, will I need to catch signals that try
to close/kill the program and call sqlite3_close() before exiting?
Thanks!!
_______________________________________________
sqlite-users mailing list
sqlite...@sqlite.org
http://sqlite.org:8080/cgi-bin/mailman/listinfo/sqlite-users
> What happens if my application fails to call sqlite3_close() before it
> exits? Does it leave the db in some unknown state or open to corruption?
>
> If I have a daemon type program, will I need to catch signals that try to
> close/kill the program and call sqlite3_close() before exiting?
>
Failure to call sqlite3_close() results in memory and file-descriptor leaks
if your process keeps running. But as those resources are cleaned up
automatically when the process exits, failure to call sqlite3_close() prior
to exit is harmless.
If you are using WAL mode, failure to call sqlite3_close() might leave -wal
and -shm lingering on your disk. But the next process to open the database
file will clean them up automatically, so no harm done.
>
> Thanks!!
> ______________________________**_________________
> sqlite-users mailing list
> sqlite...@sqlite.org
> http://sqlite.org:8080/cgi-**bin/mailman/listinfo/sqlite-**users<http://sqlite.org:8080/cgi-bin/mailman/listinfo/sqlite-users>
>
--
D. Richard Hipp
d...@sqlite.org