Issue 120: sentinel reporting error writing to config file. open(O_RDONLY) followed by fsync() would result in access denied error in windows. In the context of the code changed, ifdefing out fsync on Windows was the safest thing to do.

This commit is contained in:
jonathan pickett
2014-06-05 15:18:25 -07:00
parent 228bf0350e
commit d0c274bbf3
2 changed files with 2 additions and 0 deletions
Binary file not shown.
+2
View File
@@ -1714,7 +1714,9 @@ void sentinelFlushConfig(void) {
if (rewrite_status == -1) goto werr;
if ((fd = open(server.configfile,O_RDONLY,0)) == -1) goto werr;
#ifndef _WIN32
if (fsync(fd) == -1) goto werr;
#endif
if (close(fd) == EOF) goto werr;
return;