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. (why are you re-opening a STDERR in the first place?)
      3. Rebuild your logging routines. to open a specific log file.
      4. Use syslog ? (if your on a *nix).

HTH,
Ken
      

Mark Gilbert <[EMAIL PROTECTED]> wrote: 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 
file......

- Database corrupt....

Anyone have any wisdom on this ?

thanks

_______________________________________________
sqlite-users mailing list
sqlite-users@sqlite.org
http://sqlite.org:8080/cgi-bin/mailman/listinfo/sqlite-users

_______________________________________________
sqlite-users mailing list
sqlite-users@sqlite.org
http://sqlite.org:8080/cgi-bin/mailman/listinfo/sqlite-users

Reply via email to