[Libguestfs] [PATCH 2/3] Allow connecting to an externally spawned QEMU + appliance

Richard W.M. Jones rjones at redhat.com
Tue Jul 6 17:02:52 UTC 2010


On Tue, Jul 06, 2010 at 05:36:14PM +0100, Daniel P. Berrange wrote:
> On Tue, Jul 06, 2010 at 08:22:30AM +0100, Richard W.M. Jones wrote:
> > On Mon, Jul 05, 2010 at 12:26:00PM -0400, Daniel P. Berrange wrote:
> > 
> > > @@ -1905,6 +1996,11 @@ guestfs__kill_subprocess (guestfs_h *g)
> > >      return -1;
> > >    }
> > >  
> > > +  if (strcmp(g->method, GUESTFS_LAUNCH_METHOD_SPAWN) != 0) {
> > > +    error (g, _("cannot kill subprocess with launch method '%s'"), g->method);
> > > +    return -1;
> > > +  }
> > > +
> 
> I'm thinking about removing this error, and just make it silently
> return 0. If you change the attach method in guestfish or by setting
> $GUESTFS_LAUNCH_METHOD before running an app, they'll all get an
> error if they call kill_subprocess(). I think this isn't nice
> because setting of $GUESTFS_LAUNCH_METHOD was supposed to be 
> transparent to them. Hence probably best to just return 0.

So it would silently not kill anything.

This is OK, but it should be documented in the POD snippet
for kill_subprocess I think.

Rich.

-- 
Richard Jones, Virtualization Group, Red Hat http://people.redhat.com/~rjones
libguestfs lets you edit virtual machines.  Supports shell scripting,
bindings from many languages.  http://et.redhat.com/~rjones/libguestfs/
See what it can do: http://et.redhat.com/~rjones/libguestfs/recipes.html




More information about the Libguestfs mailing list