Gentoo Websites Logo
Go to: Gentoo Home Documentation Forums Lists Bugs Planet Store Wiki Get Gentoo!
Bug 137888 - trap hook
Summary: trap hook
Alias: None
Product: Portage Development
Classification: Unclassified
Component: Core (show other bugs)
Hardware: All Linux
: High enhancement (vote)
Assignee: Portage team
Depends on:
Reported: 2006-06-24 15:35 UTC by Luigi 'Comio' Mantellini
Modified: 2015-06-10 14:11 UTC (History)
1 user (show)

See Also:
Package list:
Runtime testing required: ---


Note You need to log in before you can comment on or make changes to this bug.
Description Luigi 'Comio' Mantellini 2006-06-24 15:35:06 UTC
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 to call an user-defined handler-function).

Comment 1 Marius Mauch (RETIRED) gentoo-dev 2007-06-23 19:49:03 UTC
Do we want to support this?
Comment 2 Zac Medico gentoo-dev 2007-06-30 10:55:16 UTC
I'm curious about what some of the use cases will be for the proposed hooks.  Most of our 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.
Comment 3 Alex Xu (Hello71) 2015-06-10 14:11:28 UTC
checking my portage-2.2.18, 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.