• R
    vircommand: fix polling in virCommandProcessIO · e34cccf7
    Roman Bogorodskiy 提交于
    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.
    e34cccf7
vircommand.c 83.7 KB