Searched refs:temp_filename (Results 1 – 2 of 2) sorted by relevance
250 const std::string temp_filename = filename + ".new"; in config_save() local267 fp = fopen(temp_filename.c_str(), "wt"); in config_save()269 LOG(ERROR) << __func__ << ": unable to write to file '" << temp_filename in config_save()284 LOG(ERROR) << __func__ << ": unable to write to file '" << temp_filename in config_save()292 << temp_filename << "': " << strerror(errno); in config_save()299 LOG(WARNING) << __func__ << ": unable to fsync file '" << temp_filename in config_save()304 LOG(ERROR) << __func__ << ": unable to close file '" << temp_filename in config_save()311 if (chmod(temp_filename.c_str(), S_IRUSR | S_IWUSR | S_IRGRP | S_IWGRP) == in config_save()319 if (rename(temp_filename.c_str(), filename.c_str()) == -1) { in config_save()342 unlink(temp_filename.c_str()); in config_save()[all …]
143 const std::string temp_filename = persistent_property_filename + ".tmp"; in ReadPersistentPropertyFile() local144 if (access(temp_filename.c_str(), F_OK) == 0) { in ReadPersistentPropertyFile()148 unlink(temp_filename.c_str()); in ReadPersistentPropertyFile()173 const std::string temp_filename = persistent_property_filename + ".tmp"; in WritePersistentPropertyFile() local175 open(temp_filename.c_str(), O_WRONLY | O_CREAT | O_NOFOLLOW | O_TRUNC | O_CLOEXEC, 0600))); in WritePersistentPropertyFile()189 if (rename(temp_filename.c_str(), persistent_property_filename.c_str())) { in WritePersistentPropertyFile()191 unlink(temp_filename.c_str()); in WritePersistentPropertyFile()