From: Razvan Cojocaru Subject: [PATCH] xenstore: Clarify xs_open() semantics Date: Fri, 28 Nov 2014 14:26:48 +0200 Message-ID: <1417177608-6705-1-git-send-email-rcojocaru@bitdefender.com> Mime-Version: 1.0 Content-Type: text/plain; charset="us-ascii" Content-Transfer-Encoding: 7bit Return-path: Received: from mail6.bemta14.messagelabs.com ([193.109.254.103]) by lists.xen.org with esmtp (Exim 4.72) (envelope-from ) id 1XuKdd-00052o-Lt for xen-devel@lists.xenproject.org; Fri, 28 Nov 2014 12:27:05 +0000 Received: from smtp02.buh.bitdefender.net (unknown [10.17.80.76]) by mx-sr.buh.bitdefender.com (Postfix) with ESMTP id 675EA803DF for ; Fri, 28 Nov 2014 14:27:02 +0200 (EET) List-Unsubscribe: , List-Post: List-Help: List-Subscribe: , Sender: xen-devel-bounces@lists.xen.org Errors-To: xen-devel-bounces@lists.xen.org To: xen-devel@lists.xenproject.org Cc: wei.liu2@citrix.com, ian.jackson@eu.citrix.com, ian.campbell@citrix.com, Razvan Cojocaru , stefano.stabellini@eu.citrix.com List-Id: xen-devel@lists.xenproject.org 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. Signed-off-by: Razvan Cojocaru Suggested-off-by: Ian Campbell --- tools/xenstore/include/xenstore.h | 12 +++++++++++- 1 file changed, 11 insertions(+), 1 deletion(-) diff --git a/tools/xenstore/include/xenstore.h b/tools/xenstore/include/xenstore.h index fdf5e76..b4b113e 100644 --- a/tools/xenstore/include/xenstore.h +++ b/tools/xenstore/include/xenstore.h @@ -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); -- 1.7.9.5