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

Enhance the command-line shell so that adding a non-zero numeric argument

to the ".exit" command causes an immediate exit without cleaning up.  This
can be used (for example) to cause journal files to be left behind.

FossilOrigin-Name: 8ba951d1b76a0fb0ffd9bc6cec1be3ddba80538a
This commit is contained in:
drh
2013-01-25 18:33:43 +00:00
parent 1590d10bc9
commit d3ac7d9b51
4 changed files with 10 additions and 13 deletions

View File

@@ -1774,7 +1774,8 @@ static int do_meta_command(char *zLine, struct callback_data *p){
p->echoOn = booleanValue(azArg[1]);
}else
if( c=='e' && strncmp(azArg[0], "exit", n)==0 && nArg==1 ){
if( c=='e' && strncmp(azArg[0], "exit", n)==0 ){
if( nArg>1 && (rc = atoi(azArg[1]))!=0 ) exit(rc);
rc = 2;
}else