Fix busy wait loop in LXC container I/O handling
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 <bb938cf255e055ff3507f2627d214e8e62118fcf@redhat.com>

zhlcindy/libvirt-1.1.4-maintain,VenkatDatta/libvirt,zhlcindy/libvirt-1.1.4-maintain,datto/libvirt,fabianfreyer/libvirt,andreabolognani/libvirt,jfehlig/libvirt,libvirt/libvirt,elmarco/libvirt,zippy2/libvirt,cbosdo/libvirt,cbosdo/libvirt,datto/libvirt,eskultety/libvirt,shugaoye/libvirt,VenkatDatta/libvirt,shugaoye/libvirt,rlaager/libvirt,taget/libvirt,agx/libvirt,datto/libvirt,shugaoye/libvirt,jardasgit/libvirt,eskultety/libvirt,andreabolognani/libvirt,andreabolognani/libvirt,libvirt/libvirt,nertpinx/libvirt,crobinso/libvirt,zhlcindy/libvirt-1.1.4-maintain,taget/libvirt,olafhering/libvirt,VenkatDatta/libvirt,zhlcindy/libvirt-1.1.4-maintain,nertpinx/libvirt,elmarco/libvirt,jardasgit/libvirt,agx/libvirt,nertpinx/libvirt,fabianfreyer/libvirt,jfehlig/libvirt,rlaager/libvirt,olafhering/libvirt,eskultety/libvirt,jardasgit/libvirt,zippy2/libvirt,agx/libvirt,shugaoye/libvirt,nertpinx/libvirt,jfehlig/libvirt,datto/libvirt,andreabolognani/libvirt,olafhering/libvirt,nertpinx/libvirt,andreabolognani/libvirt,jfehlig/libvirt,fabianfreyer/libvirt,libvirt/libvirt,cbosdo/libvirt,zippy2/libvirt,zippy2/libvirt,jardasgit/libvirt,crobinso/libvirt,cbosdo/libvirt,fabianfreyer/libvirt,fabianfreyer/libvirt,jardasgit/libvirt,taget/libvirt,elmarco/libvirt,taget/libvirt,libvirt/libvirt,eskultety/libvirt,datto/libvirt,agx/libvirt,rlaager/libvirt,elmarco/libvirt,VenkatDatta/libvirt,eskultety/libvirt,shugaoye/libvirt,olafhering/libvirt,zhlcindy/libvirt-1.1.4-maintain,agx/libvirt,crobinso/libvirt,cbosdo/libvirt,crobinso/libvirt,taget/libvirt,rlaager/libvirt,VenkatDatta/libvirt,elmarco/libvirt,rlaager/libvirt