提交 d0c274bb 编写于 作者: J jonathan pickett

Issue 120: sentinel reporting error writing to config file. open(O_RDONLY)...

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.
上级 228bf035
......@@ -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;
......
Markdown is supported
0% .
You are about to add 0 people to the discussion. Proceed with caution.
先完成此消息的编辑!
想要评论请 注册