|
[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index] Re: [Xen-devel] [PATCH v5 10/15] libxl_exec: Add libxl__spawn_initiate_failure
On Tue, Oct 16, 2018 at 03:02:37PM +0100, Ian Jackson wrote:
> Anthony PERARD writes ("[PATCH v5 10/15] libxl_exec: Add
> libxl__spawn_initiate_failure"):
> > + * The spawn state must be Attached entry and will be Attached Failed
> > + * on return.
>
> Attached on entry
>
> And, there is no such public state as `Attached Failed'. That is a
> private state. The comment about libxl__spawn_initiate_failure
> putting the spawn into state Attached Failed should be in
> libxl_exec.c, next to that function.
>
> Writing that the state afterwards is still Attached makes it clear
> that this function may be called multiple times. How about:
>
> The spawn state must be Attached on entry and will remain
> Attached. It is possible for a spawn to fail for multiple
> reasons, for example call(s) to libxl__spawn_initiate_failure
> and also for some other reason. In that case the last rc value
> from any source will take precedence.
>
> But is that really the semantics we want? Maybe the first or last
> call to libxl__spawn_initiate_failure should take precedence ?
"The first rc value [...] will take precedence" sound better I think,
instead of the last.
I'll modify libxl__spawn_initiate_failure to only set ss->rc if it it
isn't already.
--
Anthony PERARD
_______________________________________________
Xen-devel mailing list
Xen-devel@xxxxxxxxxxxxxxxxxxxx
https://lists.xenproject.org/mailman/listinfo/xen-devel
|
![]() |
Lists.xenproject.org is hosted with RackSpace, monitoring our |