summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorMike Blumenkrantz <zmike@samsung.com>2018-07-23 17:30:54 -0400
committerMike Blumenkrantz <zmike@samsung.com>2018-07-23 17:30:54 -0400
commitbf92738a5778b9525e3db04d581fa468379183f2 (patch)
tree0daa74b9ece7d6ccaa58a8c7132f6d5f40003559
parent4924fc73eeb579684c1a480805d7347e77c38721 (diff)
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
-rw-r--r--src/lib/ecore/ecore_signal.c2
1 files changed, 1 insertions, 1 deletions
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)
293 sigset_t newset; 293 sigset_t newset;
294 294
295 ecore_fork_reset_callback_del(_ecore_signal_cb_fork, NULL); 295 ecore_fork_reset_callback_del(_ecore_signal_cb_fork, NULL);
296 _ecore_signal_pipe_shutdown();
297 // we probably should restore.. but not a good idea 296 // we probably should restore.. but not a good idea
298 // pthread_sigmask(SIG_SETMASK, &sig_oldset, NULL); 297 // pthread_sigmask(SIG_SETMASK, &sig_oldset, NULL);
299 // at least do not trigger signal callback after shutdown 298 // at least do not trigger signal callback after shutdown
@@ -313,6 +312,7 @@ _ecore_signal_shutdown(void)
313# endif 312# endif
314 pthread_sigmask(SIG_BLOCK, &newset, NULL); 313 pthread_sigmask(SIG_BLOCK, &newset, NULL);
315#endif 314#endif
315 _ecore_signal_pipe_shutdown();
316 exit_signal_received = 0; 316 exit_signal_received = 0;
317} 317}
318 318