diff --git a/src/util/virfile.c b/src/util/virfile.c index 5f56005ea1c57a79618fa4ad8239332c2f34a869..4024f3da9d8ee644ed65143de04f78738f8fa05f 100644 --- a/src/util/virfile.c +++ b/src/util/virfile.c @@ -2125,7 +2125,8 @@ virFileOpenForked(const char *path, int openflags, mode_t mode, } while (fd < 0 && errno == EINTR); VIR_FORCE_CLOSE(pair[0]); /* NB: this preserves errno */ - if (fd < 0 && errno != EACCES) { + /* gnulib will return ENOTCONN in certain instances */ + if (fd < 0 && !(errno == EACCES || errno == ENOTCONN)) { ret = -errno; while (waitpid(pid, NULL, 0) == -1 && errno == EINTR); return ret;