From f21fd7e2fd396bf62af22655f92e4c38ef62b0e7 Mon Sep 17 00:00:00 2001 From: Xavi Artigas Date: Thu, 12 Jul 2018 09:17:26 -0400 Subject: [PATCH] ecore: fix order of signal fd shutdown Summary: When closing the fd handler, it checks if the fd is already closed and prints an annoying warning: "fd %d closed, can't remove from epoll - reinit!" We need to close the handler first and then the actual fd. I am not familiar with this part of the code, but this fix removes the warnings and does not seems to have adverse effects. Test Plan: It had warnings before and now it doesn't, haven't observed any other adverse effect. Reviewers: raster, zmike, devilhorns Reviewed By: zmike Subscribers: cedric, #committers Tags: #efl Differential Revision: https://phab.enlightenment.org/D6561 --- src/lib/ecore/ecore_signal.c | 10 +++++----- 1 file changed, 5 insertions(+), 5 deletions(-) diff --git a/src/lib/ecore/ecore_signal.c b/src/lib/ecore/ecore_signal.c index 60d3233f2a..9fd9a7d8b9 100644 --- a/src/lib/ecore/ecore_signal.c +++ b/src/lib/ecore/ecore_signal.c @@ -247,6 +247,11 @@ _ecore_signal_pipe_init(void) static void _ecore_signal_pipe_shutdown(void) { + if (sig_pipe_handler) + { + efl_del(sig_pipe_handler); + sig_pipe_handler = NULL; + } if (sig_pipe[0] != -1) { close(sig_pipe[0]); @@ -254,11 +259,6 @@ _ecore_signal_pipe_shutdown(void) sig_pipe[0] = -1; sig_pipe[1] = -1; } - if (sig_pipe_handler) - { - efl_del(sig_pipe_handler); - sig_pipe_handler = NULL; - } eina_spinlock_free(&sig_pid_lock); }