]> git.saurik.com Git - apt.git/commitdiff
Merge branch 'cmake'
authorJulian Andres Klode <jak@debian.org>
Wed, 10 Aug 2016 14:19:00 +0000 (16:19 +0200)
committerJulian Andres Klode <jak@debian.org>
Wed, 10 Aug 2016 14:19:00 +0000 (16:19 +0200)
1  2 
apt-pkg/deb/dpkgpm.cc

diff --combined apt-pkg/deb/dpkgpm.cc
index 6aa1ce42687d885fd0e9eb86a35de73e61b9fabf,ccfc77d6a4831ba75a192ea6f6c5faf8999e92b8..3d0fd622c5ebf56132ab49cbc962603b85ccb1b3
@@@ -403,7 -403,6 +403,7 @@@ bool pkgDPkgPM::SendPkgsInfo(FILE * con
  bool pkgDPkgPM::RunScriptsWithPkgs(const char *Cnf)
  {
     bool result = true;
 +   static bool interrupted = false;
  
     Configuration::Item const *Opts = _config->Tree(Cnf);
     if (Opts == 0 || Opts->Child == 0)
     Opts = Opts->Child;
  
     sighandler_t old_sigpipe = signal(SIGPIPE, SIG_IGN);
 +   sighandler_t old_sigint = signal(SIGINT, [](int signum){
 +       interrupted = true;
 +   });
  
     unsigned int Count = 1;
     for (; Opts != 0; Opts = Opts->Next, Count++)
           break;
        }
     }
 +   signal(SIGINT, old_sigint);
     signal(SIGPIPE, old_sigpipe);
  
 +   if (interrupted)
 +      result = _error->Error("Interrupted");
 +
     return result;
  }
                                                                        /*}}}*/
@@@ -1094,7 -1086,7 +1094,7 @@@ void pkgDPkgPM::StartPtyMagic()                                         /*
        _error->Errno("unlockpt", "Unlocking the slave of master fd %d failed!", d->master);
     else
     {
- #ifdef HAVE_PTS_NAME_R
+ #ifdef HAVE_PTSNAME_R
        char slave_name[64];    // 64 is used by bionic
        if (ptsname_r(d->master, slave_name, sizeof(slave_name)) != 0)
  #else