int rdbSaveBackground(char *filename) {
pid_t childpid;
+ long long start;
if (server.bgsavechildpid != -1 ||
server.bgsavethread != (pthread_t) -1) return REDIS_ERR;
return dsRdbSaveBackground(filename);
}
+ start = ustime();
if ((childpid = fork()) == 0) {
int retval;
_exit((retval == REDIS_OK) ? 0 : 1);
} else {
/* Parent */
+ server.stat_fork_time = ustime()-start;
if (childpid == -1) {
redisLog(REDIS_WARNING,"Can't save in background: fork: %s",
strerror(errno));