[libvirt] [PATCH] Re-write LXC controller end-of-file I/O handling yet again

2012-01-12 Thread Daniel P. Berrange
From: Daniel P. Berrange berra...@redhat.com Currently the LXC controller attempts to deal with EOF on a tty by spawning a thread todo a edge triggered epoll_wait(). This avoids the normal event loop spinning on POLLHUP. There is a subtle mistake though - even after seeing POLLHUP on a master

Re: [libvirt] [PATCH] Re-write LXC controller end-of-file I/O handling yet again

2012-01-12 Thread Eric Blake
On 01/12/2012 10:20 AM, Daniel P. Berrange wrote: From: Daniel P. Berrange berra...@redhat.com Currently the LXC controller attempts to deal with EOF on a tty by spawning a thread todo a edge triggered epoll_wait(). s/todo a edge /to do an edge-/ This avoids the normal event loop spinning

Re: [libvirt] [PATCH] Re-write LXC controller end-of-file I/O handling yet again

2012-01-12 Thread Daniel P. Berrange
On Thu, Jan 12, 2012 at 12:56:23PM -0700, Eric Blake wrote: On 01/12/2012 10:20 AM, Daniel P. Berrange wrote: @@ -1103,9 +1163,32 @@ static int lxcControllerMain(int serverFd, } for (i = 0 ; i nFds ; i++) { +consoles[i].epollFd = -1; +consoles[i].epollFd =