]> git.saurik.com Git - apt.git/commitdiff
* apt-pkg/deb/dpkgpm.cc:
authorMichael Vogt <mvo@ubuntu.com>
Wed, 26 Dec 2012 23:04:27 +0000 (00:04 +0100)
committerMichael Vogt <mvo@ubuntu.com>
Wed, 26 Dec 2012 23:04:27 +0000 (00:04 +0100)
  - use tcgetattr() on STDOUT instead of STDIN so that term.log
    works for redirected stdin

apt-pkg/deb/dpkgpm.cc
debian/changelog

index 6cb8bc6b61d465d90ac66d079faa5cf2fe621e65..fd1e6e085231fea7c79b92a68e1cda7be9334e70 100644 (file)
@@ -1205,7 +1205,7 @@ bool pkgDPkgPM::Go(int OutStatusFd)
 
       // if tcgetattr does not return zero there was a error
       // and we do not do any pty magic
-      if (tcgetattr(0, &tt) == 0)
+      if (tcgetattr(STDOUT_FILENO, &tt) == 0)
       {
         ioctl(0, TIOCGWINSZ, (char *)&win);
         if (openpty(&master, &slave, NULL, &tt, &win) < 0) 
index 1dc31af9fdbe95daccb489ab60c84f728818d637..3b9a9bafd03b9e1d365fe985abaf83bd2dc2858c 100644 (file)
@@ -2,6 +2,11 @@ apt (0.9.7.8) UNRELEASED; urgency=low
 
   [ Manpages translation updates ]
   * Italian (Beatrice Torracca). Closes: #696601
+  
+  [ Michael Vogt ]
+  * apt-pkg/deb/dpkgpm.cc:
+    - use tcgetattr() on STDOUT instead of STDIN so that term.log
+      works for redirected stdin
 
  -- Christian Perrier <bubulle@debian.org>  Mon, 24 Dec 2012 07:01:20 +0100