X-Git-Url: https://git.saurik.com/apt.git/blobdiff_plain/fa321bf3dbf363879cfc799b6c1cc4e5af50ffd8..b09e09c756861ab167647ec61ac59b85c2928be6:/apt-pkg/deb/dpkgpm.cc diff --git a/apt-pkg/deb/dpkgpm.cc b/apt-pkg/deb/dpkgpm.cc index 8123a7aba..b11ecf132 100644 --- a/apt-pkg/deb/dpkgpm.cc +++ b/apt-pkg/deb/dpkgpm.cc @@ -704,14 +704,16 @@ bool pkgDPkgPM::Go(int OutStatusFd) sighandler_t old_SIGINT = signal(SIGINT,SIG_IGN); struct termios tt; + struct termios tt_out; struct winsize win; int master; int slave; // FIXME: setup sensible signal handling (*ick*) tcgetattr(0, &tt); + tcgetattr(1, &tt_out); ioctl(0, TIOCGWINSZ, (char *)&win); - if (openpty(&master, &slave, NULL, &tt, &win) < 0) + if (openpty(&master, &slave, NULL, &tt_out, &win) < 0) { const char *s = _("Can not write log, openpty() " "failed (/dev/pts not mounted?)\n"); @@ -906,9 +908,8 @@ void pkgDPkgPM::WriteApportReport(const char *pkgpath, const char *errormsg) if (_config->FindB("Dpkg::ApportFailureReport",true) == false) return; - // only report the first error if we are in StopOnError=false mode - // to prevent bogus reports - if((_config->FindB("Dpkg::StopOnError",true) == false) && pkgFailures > 1) + // only report the first error + if(pkgFailures > _config->FindI("APT::Apport::MaxReports", 3)) return; // get the pkgname and reportfile