All of lore.kernel.org
 help / color / mirror / Atom feed
From: Alex Bligh <alex@alex.org.uk>
To: Andrew Cooper <andrew.cooper3@citrix.com>
Cc: Xen Devel <xen-devel@lists.xen.org>
Subject: Re: [PATCH] tools/libxl: Initialise both parts of ctx->sigchld_selfpipe[] to -1
Date: Mon, 18 Aug 2014 14:10:05 +0100	[thread overview]
Message-ID: <53F1FB2D.3010407@alex.org.uk> (raw)
In-Reply-To: <1408366957-19860-1-git-send-email-andrew.cooper3@citrix.com>

On 18/08/2014 14:02, Andrew Cooper wrote:
> Otherwise, if it is not used, libxl_ctx_free() will close fd 0.

Is there some way to work around this on the caller side
without a library change? Perhaps something that forces
sigchld_selfpipe to be opened?

Alex


> Reported-by: Alex Bligh <alex@alex.org.uk>
> Signed-off-by: Andrew Cooper <andrew.cooper3@citrix.com>
> CC: Ian Campbell <Ian.Campbell@citrix.com>
> CC: Ian Jackson <Ian.Jackson@eu.citrix.com>
> ---
>  tools/libxl/libxl.c |    1 +
>  1 file changed, 1 insertion(+)
> 
> diff --git a/tools/libxl/libxl.c b/tools/libxl/libxl.c
> index 3526539..a1e0b5e 100644
> --- a/tools/libxl/libxl.c
> +++ b/tools/libxl/libxl.c
> @@ -71,6 +71,7 @@ int libxl_ctx_alloc(libxl_ctx **pctx, int version,
>      ctx->childproc_user = 0;
>          
>      ctx->sigchld_selfpipe[0] = -1;
> +    ctx->sigchld_selfpipe[1] = -1;
>      libxl__ev_fd_init(&ctx->sigchld_selfpipe_efd);
>  
>      /* The mutex is special because we can't idempotently destroy it */
> 


-- 
Alex Bligh

  reply	other threads:[~2014-08-18 13:10 UTC|newest]

Thread overview: 6+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2014-08-18 13:02 [PATCH] tools/libxl: Initialise both parts of ctx->sigchld_selfpipe[] to -1 Andrew Cooper
2014-08-18 13:10 ` Alex Bligh [this message]
2014-08-18 13:19   ` Andrew Cooper
2014-08-18 14:18     ` Alex Bligh
2014-08-26 23:34 ` Andrew Cooper
2014-08-27  1:55 ` Ian Campbell

Reply instructions:

You may reply publicly to this message via plain-text email
using any one of the following methods:

* Save the following mbox file, import it into your mail client,
  and reply-to-all from there: mbox

  Avoid top-posting and favor interleaved quoting:
  https://en.wikipedia.org/wiki/Posting_style#Interleaved_style

* Reply using the --to, --cc, and --in-reply-to
  switches of git-send-email(1):

  git send-email \
    --in-reply-to=53F1FB2D.3010407@alex.org.uk \
    --to=alex@alex.org.uk \
    --cc=andrew.cooper3@citrix.com \
    --cc=xen-devel@lists.xen.org \
    /path/to/YOUR_REPLY

  https://kernel.org/pub/software/scm/git/docs/git-send-email.html

* If your mail client supports setting the In-Reply-To header
  via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line before the message body.
This is an external index of several public inboxes,
see mirroring instructions on how to clone and mirror
all data and code used by this external index.