Re: [sqlite] fprintf(stderr,...) wrote over my database.........

2008-03-24 Thread Ken
Sounds like the file was closed then re-opened, But the db was opened in between assigning the db file number to STDERR. Your app then happily used fprintf(STDERR, " blah blah blah" ); writing into the DB file. Solutions: 1. Don't use hard coded stderr. 2. Dont use freopen. (w

[sqlite] fprintf(stderr,...) wrote over my database.........

2008-03-24 Thread Mark Gilbert
Anyone seen this ? - My app is running happily like it has for years. Something happens.. - Result is that my logging which normally goes to a completely different file (connected to stderr with freopen) ends up connected to the SQLite database file, and writes all over the start of the f