summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorMichael Vogt <michael.vogt@ubuntu.com>2008-11-12 16:23:19 +0100
committerMichael Vogt <michael.vogt@ubuntu.com>2008-11-12 16:23:19 +0100
commit73e598c3acc354b963d2ec93b77006841175df5d (patch)
tree7391cdb962991269e35fd206d7cb5a2f9a8cabbc
parent17745b02462bfbc0f1e8e5b2a062d887280345ea (diff)
fix SIGHUP handling (closes: #463030)
-rw-r--r--apt-pkg/deb/dpkgpm.cc5
-rw-r--r--debian/changelog1
2 files changed, 6 insertions, 0 deletions
diff --git a/apt-pkg/deb/dpkgpm.cc b/apt-pkg/deb/dpkgpm.cc
index 36c20ad85..dde1c6d63 100644
--- a/apt-pkg/deb/dpkgpm.cc
+++ b/apt-pkg/deb/dpkgpm.cc
@@ -778,6 +778,9 @@ bool pkgDPkgPM::Go(int OutStatusFd)
sighandler_t old_SIGQUIT = signal(SIGQUIT,SIG_IGN);
sighandler_t old_SIGINT = signal(SIGINT,SIG_IGN);
+ // ignore SIGHUP as well (debian #463030)
+ sighandler_t old_SIGHUP = signal(SIGHUP,SIG_IGN);
+
struct termios tt;
struct termios tt_out;
struct winsize win;
@@ -889,6 +892,7 @@ bool pkgDPkgPM::Go(int OutStatusFd)
// Restore sig int/quit
signal(SIGQUIT,old_SIGQUIT);
signal(SIGINT,old_SIGINT);
+ signal(SIGINT,old_SIGHUP);
return _error->Errno("waitpid","Couldn't wait for subprocess");
}
@@ -928,6 +932,7 @@ bool pkgDPkgPM::Go(int OutStatusFd)
// Restore sig int/quit
signal(SIGQUIT,old_SIGQUIT);
signal(SIGINT,old_SIGINT);
+ signal(SIGINT,old_SIGHUP);
if(master >= 0)
{
diff --git a/debian/changelog b/debian/changelog
index fdf2db409..0f20db8a3 100644
--- a/debian/changelog
+++ b/debian/changelog
@@ -30,6 +30,7 @@ apt (0.7.17) UNRELEASED; urgency=low
- add missing checks for Owner == 0 in end()
* apt-pkg/deb/dpkgpm.cc:
- fix potential hang when in a backgroud process group
+ - fix SIGHUP handling (closes: #463030)
[ Dereck Wonnacott ]
* apt-ftparchive might write corrupt Release files (LP: #46439)