[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
Anthony PERARD writes ("[PATCH v5 10/15] libxl_exec: Add libxl__spawn_initiate_failure"): > This function can be used by user of libxl__spawn_* when they setup a > notification other than xenstore. The parent can already report success > via libxl__spawn_initiate_detach(), this new function can be used for > failure instead of waiting for the timeout. Thanks. > diff --git a/tools/libxl/libxl_internal.h b/tools/libxl/libxl_internal.h > index 0f3eda249a..b6c0279bb8 100644 > --- a/tools/libxl/libxl_internal.h > +++ b/tools/libxl/libxl_internal.h > @@ -1550,7 +1550,8 @@ _hidden void libxl__spawn_init(libxl__spawn_state*); > * > * The inner child must soon exit or exec. It must also soon exit or > * notify the parent of its successful startup by writing to the > - * xenstore path xspath. > + * xenstore path xspath OR via other means that the parent will have > + * to setup. to set up > +/* > + * libxl__spawn_initiate_failure - Propagate failure from the caller to the > + * callee. > + * > + * Works by killing the intermediate process from spawn_spawn. > + * After this function returns, failures will be reported via failure_cb. After this function returns, a failure will be reported > + * 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 ? Iqn. _______________________________________________ Xen-devel mailing list Xen-devel@xxxxxxxxxxxxxxxxxxxx https://lists.xenproject.org/mailman/listinfo/xen-devel
|
Lists.xenproject.org is hosted with RackSpace, monitoring our |