summaryrefslogtreecommitdiff
path: root/apt-pkg/deb/dpkgpm.cc
diff options
context:
space:
mode:
authorArch Librarian <arch@canonical.com>2004-09-20 17:02:30 +0000
committerArch Librarian <arch@canonical.com>2004-09-20 17:02:30 +0000
commit421ff8070ebdcc10831c77595e220063af36b4eb (patch)
tree03d1a6bb432e8544c5b8af85fe59ef27115c03a9 /apt-pkg/deb/dpkgpm.cc
parentfba22682691636294f0b8c82db4276f6fe28c6ec (diff)
* 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)
Diffstat (limited to 'apt-pkg/deb/dpkgpm.cc')
-rw-r--r--apt-pkg/deb/dpkgpm.cc4
1 files changed, 2 insertions, 2 deletions
diff --git a/apt-pkg/deb/dpkgpm.cc b/apt-pkg/deb/dpkgpm.cc
index ea64ef089..1548a47d4 100644
--- a/apt-pkg/deb/dpkgpm.cc
+++ b/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)