From: Ian Jackson Subject: [PATCH 3/6] libxl: events: Deregister, don't just modify, sigchld pipe fd Date: Thu, 27 Nov 2014 18:27:47 +0000 Message-ID: <1417112870-31894-4-git-send-email-ian.jackson@eu.citrix.com> References: <1417083745.12784.1.camel@citrix.com> <1417112870-31894-1-git-send-email-ian.jackson@eu.citrix.com> Mime-Version: 1.0 Content-Type: text/plain; charset="us-ascii" Content-Transfer-Encoding: 7bit Return-path: In-Reply-To: <1417112870-31894-1-git-send-email-ian.jackson@eu.citrix.com> 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.xensource.com Cc: Jim Fehlig , Ian Jackson , Ian Campbell List-Id: xen-devel@lists.xenproject.org We want to have no fd events registered when we are idle. This implies that we must be able to deregister our interest in the sigchld self-pipe fd, not just modify to request no events. Signed-off-by: Ian Jackson --- tools/libxl/libxl_fork.c | 9 +-------- 1 file changed, 1 insertion(+), 8 deletions(-) diff --git a/tools/libxl/libxl_fork.c b/tools/libxl/libxl_fork.c index fa15095..144208a 100644 --- a/tools/libxl/libxl_fork.c +++ b/tools/libxl/libxl_fork.c @@ -372,15 +372,8 @@ static void sigchld_user_remove(libxl_ctx *ctx) /* idempotent */ void libxl__sigchld_notneeded(libxl__gc *gc) /* non-reentrant, idempotent */ { - int rc; - sigchld_user_remove(CTX); - - if (libxl__ev_fd_isregistered(&CTX->sigchld_selfpipe_efd)) { - rc = libxl__ev_fd_modify(gc, &CTX->sigchld_selfpipe_efd, 0); - if (rc) - libxl__ev_fd_deregister(gc, &CTX->sigchld_selfpipe_efd); - } + libxl__ev_fd_deregister(gc, &CTX->sigchld_selfpipe_efd); } int libxl__sigchld_needed(libxl__gc *gc) /* non-reentrant, idempotent */ -- 1.7.10.4