Просмотр исходного кода

* Only try to clear stdin if it is a tty, to avoid loop...
Author: mdz
Date: 2003-07-26 00:25:44 GMT
* Only try to clear stdin if it is a tty, to avoid looping if there is
lots of stuff (perhaps an infinite amount) to read (Closes: #192228)

Arch Librarian лет назад: 22
Родитель
Сommit
421ff8070e
2 измененных файлов с 5 добавлено и 3 удалено
  1. 2 2
      apt-pkg/deb/dpkgpm.cc
  2. 3 1
      debian/changelog

+ 2 - 2
apt-pkg/deb/dpkgpm.cc

@@ -1,6 +1,6 @@
 // -*- mode: cpp; mode: fold -*-
 // Description								/*{{{*/
-// $Id: dpkgpm.cc,v 1.26 2003/04/27 03:02:40 doogie Exp $
+// $Id: dpkgpm.cc,v 1.27 2003/07/26 00:25:44 mdz Exp $
 /* ######################################################################
 
    DPKG Package Manager - Provide an interface to dpkg
@@ -448,7 +448,7 @@ bool pkgDPkgPM::Go()
 	 if (chdir(_config->FindDir("DPkg::Run-Directory","/").c_str()) != 0)
 	    _exit(100);
 	 
-	 if (_config->FindB("DPkg::FlushSTDIN",true) == true)
+	 if (_config->FindB("DPkg::FlushSTDIN",true) == true && isatty(STDIN_FILENO))
 	 {
 	    int Flags,dummy;
 	    if ((Flags = fcntl(STDIN_FILENO,F_GETFL,dummy)) < 0)

+ 3 - 1
debian/changelog

@@ -23,8 +23,10 @@ apt (0.5.8) unstable; urgency=medium
     YnPrompt works correctly (Closes: #200953).  No other translations seem
     to have this problem
   * Regenerate POT file and sync .po files
+  * Only try to clear stdin if it is a tty, to avoid looping if there is
+    lots of stuff (perhaps an infinite amount) to read (Closes: #192228)
 
- --
+ -- Matt Zimmerman <mdz@debian.org>  Fri, 25 Jul 2003 20:21:53 -0400
 
 apt (0.5.7) unstable; urgency=low