]> git.ipfire.org Git - thirdparty/libvirt.git/commit
Fix busy wait loop in LXC container I/O handling
authorDaniel P. Berrange <berrange@redhat.com>
Fri, 1 Nov 2013 16:24:30 +0000 (16:24 +0000)
committerCole Robinson <crobinso@redhat.com>
Wed, 20 Nov 2013 15:32:25 +0000 (10:32 -0500)
commit6b2e21795e4a2582c6e29d0aa0a8d7034f44e22a
tree68d933f09d77d37a56670b26797378b258454a90
parentbd719a01144b39d9a78285ca4cea886239cd5e0a
Fix busy wait loop in LXC container I/O handling

If the host side of an LXC container console disconnected
and the guest side continued to write data, until the PTY
buffer filled up, the LXC controller would busy wait. It
would repeatedly see POLLHUP from poll() and not disable
the watch.

This was due to some bogus logic detecting blocking
conditions. Upon seeing a POLLHUP we must disable all
reading & writing from the PTY, and setup the epoll to
wake us up again when the connection comes back.

Signed-off-by: Daniel P. Berrange <berrange@redhat.com>
(cherry picked from commit 5087a5a0092853702eb5e0c0297937a7859bcab3)
src/lxc/lxc_controller.c