Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
[mce] Use sigaction() for registering signal handlers. Fixes JB#38515
Under hard to reproduce conditions mce can crash due to SIGPIPE when attempting to writev() to libdsme related unix domain socket. Assumption is that it might have something to do with mce setting up SIGPIPE handler via signal() and attempting to pass the signals to mainloop just to be ignored there. Simply ignore SIGPIPE altogether instead of attempting to move it from signal handler context to mainloop. Also use sigaction() for setting up signal handlers, separate handling of terminal failure signals from expected control signals, and make sure that signal() function is used only for SIG_IGN and SIG_DFL purposes. Signed-off-by: Simo Piiroinen <simo.piiroinen@jollamobile.com>
- Loading branch information
Showing
1 changed file
with
71 additions
and
40 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters