From 73e598c3acc354b963d2ec93b77006841175df5d Mon Sep 17 00:00:00 2001 From: Michael Vogt Date: Wed, 12 Nov 2008 16:23:19 +0100 Subject: fix SIGHUP handling (closes: #463030) --- apt-pkg/deb/dpkgpm.cc | 5 +++++ 1 file changed, 5 insertions(+) (limited to 'apt-pkg/deb') 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) { -- cgit v1.2.3