Force quit when receiving a second SIGINT.

Also quit ASAP when we are still loading a DB, since care is not needed
in this special condition, especially for a SIGINT.
This commit is contained in:
antirez
2014-08-07 16:32:50 +02:00
parent d99a7246f8
commit 7bb25f8a46
2 changed files with 14 additions and 2 deletions

View File

@ -766,7 +766,7 @@ int rdbSaveBackground(char *filename) {
void rdbRemoveTempFile(pid_t childpid) {
char tmpfile[256];
snprintf(tmpfile,256,"temp-%d.rdb", (int) childpid);
snprintf(tmpfile,sizeof(tmpfile),"temp-%d.rdb", (int) childpid);
unlink(tmpfile);
}