3257. [bug] Do not generate a error message when calling fsync()

in a pipe or socket. [RT #27109]
This commit is contained in:
Mark Andrews
2011-12-22 08:49:01 +00:00
parent 83878aaa47
commit 9ddf371552
2 changed files with 9 additions and 2 deletions

View File

@@ -1,3 +1,6 @@
3257. [bug] Do not generate a error message when calling fsync()
in a pipe or socket. [RT #27109]
3256. [bug] Disable empty zones for lwresd -C. [RT #27139] 3256. [bug] Disable empty zones for lwresd -C. [RT #27139]
3255. [func] No longer require that a empty zones be explicitly 3255. [func] No longer require that a empty zones be explicitly

View File

@@ -15,7 +15,7 @@
* PERFORMANCE OF THIS SOFTWARE. * PERFORMANCE OF THIS SOFTWARE.
*/ */
/* $Id: stdio.c,v 1.10 2011/03/05 23:52:31 tbox Exp $ */ /* $Id: stdio.c,v 1.11 2011/12/22 08:49:01 marka Exp $ */
#include <config.h> #include <config.h>
@@ -110,7 +110,11 @@ isc_stdio_sync(FILE *f) {
int r; int r;
r = fsync(fileno(f)); r = fsync(fileno(f));
if (r == 0) /*
* fsync is not supported on sockets and pipes which
* result in EINVAL / ENOTSUP.
*/
if (r == 0 || errno == EINVAL || errno == ENOTSUP)
return (ISC_R_SUCCESS); return (ISC_R_SUCCESS);
else else
return (isc__errno2result(errno)); return (isc__errno2result(errno));