[prev in list] [next in list] [prev in thread] [next in thread]
List: xen-cvs
Subject: [Xen-changelog] [xen stable-4.2] libxl: save/restore errno in SIGCHLD handler
From: patchbot () xen ! org
Date: 2013-11-26 8:11:02
Message-ID: E1VlDja-0003MF-Vc () xenbits ! xen ! org
[Download RAW message or body]
commit 616dfff3e37bbda0bcfa37991e19d522d7726744
Author: Ian Jackson <ian.jackson@eu.citrix.com>
AuthorDate: Mon Nov 11 17:17:55 2013 +0000
Commit: Ian Jackson <Ian.Jackson@eu.citrix.com>
CommitDate: Mon Nov 25 13:49:23 2013 +0000
libxl: save/restore errno in SIGCHLD handler
Without this, code interrupted by SIGCHLD may experience strange
values of errno. (As far as I know this is not the cause of any
reported bugs.)
This fix should be backported in due course.
Signed-off-by: Ian Jackson <Ian.Jackson@eu.citrix.com>
Acked-by: Ian Campbell <ian.campbell@citrix.com>
(cherry picked from commit 704d10289bcaee46a3ef6cdc7966186e3b8033fa)
(cherry picked from commit be68feb0e12a4538a33f5526ec1a09165aa18a45)
---
tools/libxl/libxl_fork.c | 2 ++
1 files changed, 2 insertions(+), 0 deletions(-)
diff --git a/tools/libxl/libxl_fork.c b/tools/libxl/libxl_fork.c
index 044ddad..b6f0b2d 100644
--- a/tools/libxl/libxl_fork.c
+++ b/tools/libxl/libxl_fork.c
@@ -157,8 +157,10 @@ int libxl__carefd_fd(const libxl__carefd *cf)
static void sigchld_handler(int signo)
{
+ int esave = errno;
int e = libxl__self_pipe_wakeup(sigchld_owner->sigchld_selfpipe[1]);
assert(!e); /* errors are probably EBADF, very bad */
+ errno = esave;
}
static void sigchld_removehandler_core(void)
--
generated by git-patchbot for /home/xen/git/xen.git#stable-4.2
_______________________________________________
Xen-changelog mailing list
Xen-changelog@lists.xen.org
http://lists.xensource.com/xen-changelog
[prev in list] [next in list] [prev in thread] [next in thread]
Configure |
About |
News |
Add a list |
Sponsored by KoreLogic