On Linux, is it possible to somehow disable signaling for programs externally... that is, without modifying their source code?
Context:
The "trap" command is local to this process, never applies to children.
To really trap the signal, you have to hack it using a LD_PRELOAD
hook. This is non-trival task (you have to compile a loadable with _init()
, sigaction()
inside), so I won't include the full code here. You can find an example for SIGSEGV on Phack Volume 0x0b, Issue 0x3a, Phile #0x03.
Alternativlly, try the nohup
and tail
trick.
nohup your_command &
tail -F nohup.out