Skip to contentSkip to conversation

xenstore: Clarify xs_open() semantics

PATCH New Razvan Cojocaru 4 participants 4 messages Nov 28, 2014 – Dec 2, 2014

lore
Share & tools
lore
#0 lore raw

PATCH 1/1 xenstore: Clarify xs_open() semantics

Added to the xs_open() comments in xenstore.h. The text has been taken almost verbatim from a xen-devel email by Ian Campbell, and confirmed as accurate by Ian Jackson.

---
 tools/xenstore/include/xenstore.h |   12 +++++++++++-
 1 file changed, 11 insertions(+), 1 deletion(-)
tools/xenstore/include/xenstore.h +11 -1
index fdf5e76..b4b113e 100644
@@ -59,10 +59,20 @@ typedef uint32_t xs_transaction_t;
 /* On failure, these routines set errno. */
 
 /* Open a connection to the xs daemon.
- * Attempts to make a connection over the socket interface, 
+ * Attempts to make a connection over the socket interface,
  * and if it fails, then over the  xenbus interface.
  * Mode 0 specifies read-write access, XS_OPEN_READONLY for
  * read-only access.
+ *
+ * * Connections made with xs_open(0) (which might be shared page or
+ *   socket based) are only guaranteed to work in the parent after
+ *   fork.
+ * * Connections made with xs_open(XS_OPEN_SOCKETONLY) will be usable
+ *   in either the parent or the child after fork, but not both.
+ * * xs_daemon_open*() and xs_domain_open() are deprecated synonyms
+ *   for xs_open(0).
+ * * XS_OPEN_READONLY has no bearing on any of this.
+ *
  * Returns a handle or NULL.
  */
 struct xs_handle *xs_open(unsigned long flags);
Signature · 1 line
1.7.9.5
#2 lore raw
Quoted 9 lines · Ian Jackson

Razvan Cojocaru writes ("[PATCH] xenstore: Clarify xs_open() semantics"):

Quoted 6 lines

Added to the xs_open() comments in xenstore.h. The text has been taken almost verbatim from a xen-devel email by Ian Campbell, and confirmed as accurate by Ian Jackson.

It is documentation per say so it can go in ..

Quoted 5 lines

_______________________________________________
Xen-devel mailing list
[email protected]
http://lists.xen.org/xen-devel

Applied
#3 lore raw
Quoted 6 lines · Konrad Rzeszutek Wilk
Quoted 5 lines · Ian Jackson

Razvan Cojocaru writes ("[PATCH] xenstore: Clarify xs_open() semantics"):

Quoted 4 lines

Added to the xs_open() comments in xenstore.h. The text has been taken almost verbatim from a xen-devel email by Ian Campbell, and confirmed as accurate by Ian Jackson.

Quoted 6 lines
Quoted 4 lines
Quoted 2 lines

It is documentation per say so it can go in ..

Applied.