Quellcode durchsuchen

fix SIGHUP handling (closes: #463030)

Michael Vogt vor 17 Jahren
Ursprung
Commit
6e7f872dfd
2 geänderte Dateien mit 8 neuen und 0 gelöschten Zeilen
  1. 5 0
      apt-pkg/deb/dpkgpm.cc
  2. 3 0
      debian/changelog

+ 5 - 0
apt-pkg/deb/dpkgpm.cc

@@ -773,6 +773,9 @@ bool pkgDPkgPM::Go(int OutStatusFd)
       sighandler_t old_SIGQUIT = signal(SIGQUIT,SIG_IGN);
       sighandler_t old_SIGQUIT = signal(SIGQUIT,SIG_IGN);
       sighandler_t old_SIGINT = signal(SIGINT,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;
       struct	termios tt_out;
       struct	termios tt_out;
       struct	winsize win;
       struct	winsize win;
@@ -881,6 +884,7 @@ bool pkgDPkgPM::Go(int OutStatusFd)
 	    // Restore sig int/quit
 	    // Restore sig int/quit
 	    signal(SIGQUIT,old_SIGQUIT);
 	    signal(SIGQUIT,old_SIGQUIT);
 	    signal(SIGINT,old_SIGINT);
 	    signal(SIGINT,old_SIGINT);
+	    signal(SIGINT,old_SIGHUP);
 	    return _error->Errno("waitpid","Couldn't wait for subprocess");
 	    return _error->Errno("waitpid","Couldn't wait for subprocess");
 	 }
 	 }
 
 
@@ -920,6 +924,7 @@ bool pkgDPkgPM::Go(int OutStatusFd)
       // Restore sig int/quit
       // Restore sig int/quit
       signal(SIGQUIT,old_SIGQUIT);
       signal(SIGQUIT,old_SIGQUIT);
       signal(SIGINT,old_SIGINT);
       signal(SIGINT,old_SIGINT);
+      signal(SIGINT,old_SIGHUP);
 
 
       if(master >= 0) 
       if(master >= 0) 
       {
       {

+ 3 - 0
debian/changelog

@@ -13,6 +13,9 @@ apt (0.7.19) unstable; urgency=low
       is a request to install only one package and it is not installable.
       is a request to install only one package and it is not installable.
       (Closes: #419521)
       (Closes: #419521)
 
 
+  [ Michael Vogt ]
+    - fix SIGHUP handling (closes: #463030)
+
  -- Eugene V. Lyubimkin <jackyf.devel@gmail.com>  Sat, 08 Nov 2008 12:40:19 +0200
  -- Eugene V. Lyubimkin <jackyf.devel@gmail.com>  Sat, 08 Nov 2008 12:40:19 +0200
 
 
 apt (0.7.18) unstable; urgency=low
 apt (0.7.18) unstable; urgency=low