Issue
How can I change the list of signals catched with 'Piping core dumps to a program'('man core')?
Currently catched the only SIGQUIT/SIGILL/SIGTRAP/SIGABRT/SIGBUS/SIGFPE/SIGSEGV/SIGXCPU/SIGXFSZ/SIGSYS signals.
I need to add some other signals like SIGPIPE. How can I do it?
Solution
The following statement from the signal(2)
manpage answers your question:
During an execve(2), the dispositions of handled signals are reset to the default; the
dispositions of ignored signals are feft unchanged.
If another words, you can only set signals to be ignored in an arbitrary process and only if the arbitrary process does not override that by configuring its own signal dispositions.
Any signals which are not ignored will revert back to default behaviour when a process is started (executed). The only way to change signal handling behaviour in that case is within the process itself.
You can use sigaction(2)
to change signal handling behaviour in a process for which you have the source code. Otherwise, there is nothing you can do.
Answered By - isedev Answer Checked By - Terry (WPSolving Volunteer)