]> 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)
committerDaniel P. Berrange <berrange@redhat.com>
Tue, 12 Nov 2013 11:14:49 +0000 (11:14 +0000)
commit5087a5a0092853702eb5e0c0297937a7859bcab3
treebd79476c6edf219bce631d659dc43ce4e3568af5
parentcbb6ec42e2447d7920b30d66923b2a2b2670133b
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>
src/lxc/lxc_controller.c