]> xenbits.xensource.com Git - libvirt.git/commit
openvz: convert popen to virCommand
authorEric Blake <eblake@redhat.com>
Fri, 3 Dec 2010 00:29:34 +0000 (17:29 -0700)
committerEric Blake <eblake@redhat.com>
Tue, 7 Dec 2010 22:35:36 +0000 (15:35 -0700)
commitbfd6267bcdbde6ac174ef58be6e32848820a202c
tree539280afda7392459806b9adf741eb691b99b198
parentcc5e2a849c853d172a067b12fabfbc6696f9bd08
openvz: convert popen to virCommand

popen must be matched with pclose (not fclose), or it will leak
resources.  Furthermore, it is a lousy interface when it comes to
signal handling.  We're much better off using our decent command
wrapper.  Note that virCommand guarantees that VIR_FREE(outbuf) is
both required and safe to call, whether virCommandRun succeeded or
failed.

* src/openvz/openvz_conf.c (openvzLoadDomains, openvzGetVEID):
Replace popen with virCommand usage.
src/openvz/openvz_conf.c