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 524b2626f7
commit ebd25710dd
2 changed files with 14 additions and 2 deletions

View File

@ -765,7 +765,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);
}