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>
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)