forked from enlightenment/efl
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
This commit is contained in:
parent
4924fc73ee
commit
bf92738a57
|
@ -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;
|
||||
}
|
||||
|
||||
|
|
Loading…
Reference in New Issue