On 11/05/2012 06:21 AM, Christophe Fergeau wrote:
After upgrading to libvirt 1.0.0, I've started getting warnings
from libvirt:
(gnome-boxes:5965): Libvirt.GObject-CRITICAL **: cannot finish stream:
internal error libvirt_iohelper: unable to fsync stdout: Invalid argument
On further investigation, in iohelper.c:runIO(), fdatasync can get called
on STDOUT_FILENO, which indeed returns EINVAL when this happens. After
making sure that fdout is not STDOUT_FILENO, this warning goes away.
---
src/util/iohelper.c | 8 +++++---
1 file changed, 5 insertions(+), 3 deletions(-)
NACK. It is not because we are calling fdatasync(1), but because fd 1
happens to be something that is not syncable (perhaps a pipe). We need
to figure out the real condition on when fd 1 is syncable, and skip the
error in the case where it is a pipe or some other non-syncable fd, and
not based on some magic exemption of just fd 1 without even knowing why
we are failing.
--
Eric Blake eblake(a)redhat.com +1-919-301-3266
Libvirt virtualization library
http://libvirt.org