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

Eric Blake eblake at redhat.com
Tue Dec 21 20:20:51 UTC 2010


On 12/21/2010 12:40 PM, Laine Stump wrote:
> 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.

Now pushed.

-- 
Eric Blake   eblake at redhat.com    +1-801-349-2682
Libvirt virtualization library http://libvirt.org

-------------- next part --------------
A non-text attachment was scrubbed...
Name: signature.asc
Type: application/pgp-signature
Size: 619 bytes
Desc: OpenPGP digital signature
URL: <http://listman.redhat.com/archives/libvir-list/attachments/20101221/62a3c3e0/attachment-0001.sig>


More information about the libvir-list mailing list