minor fix

This commit is contained in:
antirez 2010-01-15 13:17:43 -05:00
parent 054e426dbd
commit 2316bb3b42

View File

@ -3011,7 +3011,12 @@ static int rdbSave(char *filename) {
int j;
time_t now = time(NULL);
waitEmptyIOJobsQueue(); /* Otherwise other threads may fseek() the swap */
/* Wait for I/O therads to terminate, just in case this is a
* foreground-saving, to avoid seeking the swap file descriptor at the
* same time. */
if (server.vm_enabled)
waitEmptyIOJobsQueue();
snprintf(tmpfile,256,"temp-%d.rdb", (int) getpid());
fp = fopen(tmpfile,"w");
if (!fp) {