[libvirt] [PATCH] command: avoid hanging on daemon processes

Laine Stump laine at laine.org
Tue Dec 21 19:40:55 UTC 2010


On 12/21/2010 01:54 PM, Eric Blake wrote:
> * src/util/command.c (virCommandRun): Don't capture output on
> daemons.
> * tests/commandtest.c (test18): Expose the bug.
> Reported by Laine Stump.
> ---
>
> Even though 'test4' in commandtest created a daemon, the daemon
> exits rather quickly, so that no one noticed the problem.  And
> the existing qemu daemon use of virCommand was supplying log
> file descriptors, rather than letting virCommand capture output.
>
> I've verified that with just the tests/ changes, that the testsuite
> fails (termination due to SIGALRM).
>
>   src/util/command.c  |   24 ++++++++++++++----------
>   tests/commandtest.c |   42 ++++++++++++++++++++++++++++++++++++++++++
>   2 files changed, 56 insertions(+), 10 deletions(-)

ACK. This works properly for the case where it didn't work previously.


Thanks!




More information about the libvir-list mailing list