[Date Prev][Date Next]   [Thread Prev][Thread Next]   [Thread Index] [Date Index] [Author Index]

Re: [libvirt] [PATCH] vircommand: fix polling in virCommandProcessIO



  Martin Kletzander wrote:

> On Tue, Apr 21, 2015 at 08:19:45PM +0300, Roman Bogorodskiy wrote:
> >When running on FreeBSD, there's a bug in virCommandProcessIO
> >polling that is triggered by the commandtest.
> >
> >A test that triggers EPIPE in commandtest (named "test20") hungs
> >forever on FreeBSD.
> >
> >Apparently, this happens because FreeBSD sets POLLHUP flag on revents
> >when stdin in closed. And as the current implementation only checks for
> >POLLOUT and POLLERR, it ends up looping forever inside
> >virCommandProcessIO and not trying to do one more write() that would
> >trigger EPIPE.
> >
> >To fix that check for the POLLHUP flag along with POLLOUT and POLLERR.
> 
> We're already checking that for the pipe heading the other way and
> according to information I found it makes sense to do this, even
> though it seems that according to documentation this shouldn't happen.
> 
> ACK

Pushed, thanks!

Roman Bogorodskiy

Attachment: pgp8MizrAgULp.pgp
Description: PGP signature


[Date Prev][Date Next]   [Thread Prev][Thread Next]   [Thread Index] [Date Index] [Author Index]