[Libguestfs] setpgid() before exec'ing qemu
Richard W.M. Jones
rjones at redhat.com
Fri Mar 11 17:43:52 UTC 2011
On Fri, Mar 11, 2011 at 05:26:50PM +0000, Richard W.M. Jones wrote:
> As Chris says, any reason to be using kill_subprocess at all?
Actually as Chris *didn't* say, I was reading that wrong :-)
Anyway, I'd try deleting the handle. AFAIK Python will run the
destructor immediately, and the path taken via guestfs_close certainly
kills the subprocess:
http://git.annexia.org/?p=libguestfs.git;a=blob;f=src/guestfs.c;h=8b7ab4d7713ccff93f6b9bf0a066970ce3c8e8bb;hb=HEAD#l169
If you're really worried about the subprocess staying around, then
grab the PID (g.get_pid) and kill the process *after* deleting the
handle. (This is way outside the scope of the API ...)
Rich.
--
Richard Jones, Virtualization Group, Red Hat http://people.redhat.com/~rjones
virt-top is 'top' for virtual machines. Tiny program with many
powerful monitoring features, net stats, disk stats, logging, etc.
http://et.redhat.com/~rjones/virt-top
More information about the Libguestfs
mailing list