On 11/06/18 17:17, Adriano dos Santos Fernandes wrote:
On 06/11/2018 09:57, Dimitry Sibiryakov wrote:
06.11.2018 7:34, Alex Peshkoff via Firebird-devel wrote:
An idea was to have same behavior for remote and embedded
connections, please read doc/README.fb_shutdown, pay attention at
fb_shut_confirmation and a sample in the end.
   All this workaround for workarounds just because engine cannot be
properly finalized in atexit()? OMG...


I agree, this is a area I don't feel the right thing is done.

Initially, I handled the signal to make ISQL catch ctrl+c and cancel the
current query execution, then it was changed to many others things.

I think if an application working with embedded could corrupt data due
to ctrl+c, that application should handle it.


As long as we have safe write order to database file it should not be corrupted due to unexpected interrupt. Even FW is not needed for it - nothing prevents OS to flush cache to the disk after application was interrupted. On the other side we all know that 'should not be corrupted' and 'not corrupted' are unfortunately a bit different things :) And if the user likes to press ctrl-C to exit from some application then sooner or later something may go wrong. I prefer to save database with all possible measures. The user has a chance to avoid engine shutdown on signal caught using fb_shutdown_callback() but that will be his choice. Default should be safe.




Firebird-Devel mailing list, web interface at 
https://lists.sourceforge.net/lists/listinfo/firebird-devel

Reply via email to