Bug#229854: libapt overrides application signal handlers and doesn't restore them
tags 229854 pending
thanks
On Mon, Jan 26, 2004 at 08:53:05PM -0500, Daniel Burrows wrote:
> It was recently pointed out to me that ^Cing aptitude will cause
> problems with the display; the reporter suggested that I install a
> signal handler to fix the problem. This seemed a bit odd to me, since I
> already have a number of signal handlers to catch terminating signals
> and restore the terminal state.
>
> It turned out that dpkgpm.cc has several calls to signal().
> Presumably this has to do with getting dpkg to run properly -- but the
> signals are not restored to their previous values after dpkg finishes.
Yes, the comment in the source explains that this is necessary because dpkg
blocks these signals.
> Of course, there's an obvious workaround -- I'll just bracket the
> dpkg calls with manual saves/restores of the signal handlers for now,
> but this is IMO incorrect behavior on the part of libapt, and it will
> likely bite someone else if it hasn't already.
Fixed in CVS.
--
- mdz
Reply to: