1
0
mirror of https://github.com/sqlite/sqlite.git synced 2025-11-03 16:53:36 +03:00

In the command-line shell, if three or more interrupt signals (control-c)

are received in a row without a response from sqlite3_interrupt() then
call exit(1) immediately.  This allows control-C to interrupt the shell
even if it is stuck in a computation or loop that does not involve the
VDBE.

FossilOrigin-Name: b5cde57166fd874d00dec23d3a59bf3a23979fc5
This commit is contained in:
drh
2014-05-23 12:03:47 +00:00
parent e48ae7157a
commit 43ae8f6f4d
3 changed files with 9 additions and 8 deletions

View File

@@ -697,7 +697,8 @@ static void output_csv(struct callback_data *p, const char *z, int bSep){
*/
static void interrupt_handler(int NotUsed){
UNUSED_PARAMETER(NotUsed);
seenInterrupt = 1;
seenInterrupt++;
if( seenInterrupt>2 ) exit(1);
if( db ) sqlite3_interrupt(db);
}
#endif