From bf92738a5778b9525e3db04d581fa468379183f2 Mon Sep 17 00:00:00 2001 From: Mike Blumenkrantz Date: Mon, 23 Jul 2018 17:30:54 -0400 Subject: [PATCH] ecore/signal: delete signal pipe after unsetting signal handlers Summary: if a signal is already in the signal pipe when close() is called, this will trigger a SIGPIPE. if the signal handler exists, this will cause the signal handler to infinitely recurse when trying to print the error messages from write()ing the signal data to the close()d pipe fix T7158 Reviewers: ManMower Reviewed By: ManMower Subscribers: cedric, #committers Tags: #efl_main_loop Maniphest Tasks: T7158 Differential Revision: https://phab.enlightenment.org/D6670 --- src/lib/ecore/ecore_signal.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/src/lib/ecore/ecore_signal.c b/src/lib/ecore/ecore_signal.c index 65b9179393..e03233dcae 100644 --- a/src/lib/ecore/ecore_signal.c +++ b/src/lib/ecore/ecore_signal.c @@ -293,7 +293,6 @@ _ecore_signal_shutdown(void) sigset_t newset; ecore_fork_reset_callback_del(_ecore_signal_cb_fork, NULL); - _ecore_signal_pipe_shutdown(); // we probably should restore.. but not a good idea // pthread_sigmask(SIG_SETMASK, &sig_oldset, NULL); // at least do not trigger signal callback after shutdown @@ -313,6 +312,7 @@ _ecore_signal_shutdown(void) # endif pthread_sigmask(SIG_BLOCK, &newset, NULL); #endif + _ecore_signal_pipe_shutdown(); exit_signal_received = 0; }