I'm making some bashrc scripts to enhance emerge. I'm interested to catch signals (SIGQUIT, SIGINT, SIGTTRAP) in my code without to generate conflicts with the emerging process. I ask you to introduce some hooks to intercept the signals (for example, modifying the abort_* function in ebuild.sh to call an user-defined handler-function). Thanks
Do we want to support this?
I'm curious about what some of the use cases will be for the proposed hooks. Most of our ebuild.sh traps are pretty useless and I'd like to remove them (or replace them with hooks if that's really useful). The only trap that currently seems to do anything useful is the SIGTERM trap which is used to implement support for die in a subshell.
checking my portage-2.2.18 ebuild.sh, there appears to only be a SIGTERM trap. SIGTERM needs to be trapped for die to work, and the only standard utility that generates it is "kill" which can be easily modified to generate another signal.