xen-devel.lists.xenproject.org archive mirror
 help / color / mirror / Atom feed
* [PATCH] tools/libxl: Initialise both parts of ctx->sigchld_selfpipe[] to -1
@ 2014-08-18 13:02 Andrew Cooper
  2014-08-18 13:10 ` Alex Bligh
                   ` (2 more replies)
  0 siblings, 3 replies; 6+ messages in thread
From: Andrew Cooper @ 2014-08-18 13:02 UTC (permalink / raw)
  To: Xen-devel; +Cc: Andrew Cooper, Ian Jackson, Ian Campbell, Alex Bligh

Otherwise, if it is not used, libxl_ctx_free() will close fd 0.

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 */
-- 
1.7.10.4

^ permalink raw reply related	[flat|nested] 6+ messages in thread

end of thread, other threads:[~2014-08-27  1:55 UTC | newest]

Thread overview: 6+ messages (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
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
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

This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for NNTP newsgroup(s).