]> git.ipfire.org Git - thirdparty/libvirt.git/commit
virsh: Fix job watching when STDIN is not a tty
authorPeter Krempa <pkrempa@redhat.com>
Tue, 22 Oct 2013 14:01:26 +0000 (15:01 +0100)
committerPeter Krempa <pkrempa@redhat.com>
Tue, 22 Oct 2013 14:01:26 +0000 (15:01 +0100)
commit47e639665119d90dfbf52adde31fe027f0eac895
tree2b6f9c7bb5818ca1831424b7e21c528207e1ac34
parentdc33207dbec58d2e2e9a554393a8919bf1c84221
virsh: Fix job watching when STDIN is not a tty

In commit b46c4787dde79b015dad67dedda4ccf6ff1a3082 I changed the code to
watch long running jobs in virsh. Unfortunately I didn't take into
account that poll may get a hangup if the terminal is not a TTY and will
be closed.

This patch avoids polling the STDIN fd when there's no TTY.
tools/virsh-domain.c
tools/virsh.c
tools/virsh.h