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

Re: [Xen-devel] [PATCH] xl: log an error if libxl_cpupool_destroy() fails

On Fri, 2015-10-23 at 17:12 +0200, Dario Faggioli wrote:
> On Fri, 2015-10-23 at 15:09 +0100, Ian Campbell wrote:
> > On Fri, 2015-10-23 at 09:43 +0100, Wei Liu wrote:
> > Looking at those links, I'm not sure that either you or myself was
> > thinking
> > of using EXIT_* as function return values, just that the eventual
> > process
> > exit would become one of those values instead of some negative
> > number.
> > 
> Exactly.
> > Although the thread doesn't look like it is too clear if it is
> > talking
> > about return values from functions vs. process exit codes.
> > 
> Well, independently from the thread, I certainly meant that I think
> EXIT_* should be used as process exit status, not as internal
> functions' return value.
> > I think what I would have been expecting is for the xl internal error
> > code
> > Well, same here. Except, given xl architecture, I was considering
> main_foo() functions in xl_cmdimpl.c as some king of extensions of the
> actual main function.

I had somehow convinced myself that these weren't being added in a
main_foo, I agree that main_foo should be treated somewhat like a regular

Sorry for the noise.

> I'm fine with either, so, if you prefer the latter, I certainly can
> arrange for doing things that way.

It would be helpful to a) not combine this change with the logging change
and to b) include as part of the patch some sort of document comment in
some relevant xl-ish place explaining some of this stuff (i.e. that an xl
process should always return EXIT_FOO and that main_* can be treated like
main() as if they are returning a process exit status and not a function
return value).

I think it would also be useful to have xl's main() DTRT before starting to 
convert main_*. Currently it returns explicit 0 or 1 or the result of the 


Xen-devel mailing list



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