[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

Re: [Xen-devel] [PATCH 8/9] libxl: Kill QEMU by uid when possible



George Dunlap writes ("Re: [PATCH 8/9] libxl: Kill QEMU by uid when possible"):
> Right, I didn’t notice that read_checked filtered out ENOENT (thus a non-zero 
> value for ret indicates a different error).
> 
> Not really sure what the best thing would be to do in that case; maybe 
> returning an error immediately is the better option.

I don't mind whether we do some kind of best effort thing or bail
right away, but in either case this should be regarded as an error.

> But Anthony tells me that’s not the case, so I’m leaning more towards 
> reorganizing this function to look like the following:
> 
> 1. libxl__qmp_cleanup()
> 2. kill_by_pid(pid);
> 3. if (uid) kill_by_uid(uid);
> 
> That is, always kill by pid, and kill by uid if it’s available; but remove 
> the qmp socket first.

I don't have a strong opinion about this, but putting the
libxl__qmp_cleanup after qemu has been killed seems more
straightforward to me (and I've already said there should be a single
exit path so it can go there...)

> > It would be nice to drop the spurious space before dm_runas while you
> > are here, and then presumably the double space before *dm_uid would
> > not be needed.
> 
> Well presumably it would be better to fix it back in patch 2 instead. :-)

Err, yes :-).

Ian.

_______________________________________________
Xen-devel mailing list
Xen-devel@xxxxxxxxxxxxxxxxxxxx
https://lists.xenproject.org/mailman/listinfo/xen-devel

 


Rackspace

Lists.xenproject.org is hosted with RackSpace, monitoring our
servers 24x7x365 and backed by RackSpace's Fanatical Support®.