summaryrefslogtreecommitdiff
path: root/cmdline/apt-get.cc
diff options
context:
space:
mode:
authorArch Librarian <arch@canonical.com>2004-09-20 17:04:02 +0000
committerArch Librarian <arch@canonical.com>2004-09-20 17:04:02 +0000
commita3f6ea20fbe26cb53f420c069c8f59e89f94bcfa (patch)
tree735b5b3e0d06fd7f3170d233342f3b40204bba81 /cmdline/apt-get.cc
parent6cb7ccbb7ae7eb18316069ecca4d74708dee356d (diff)
* Use isatty rather than ttyname for checking if stdin ...
Author: mdz Date: 2003-11-19 23:50:51 GMT * Use isatty rather than ttyname for checking if stdin is a terminal. isatty has the advantage of not requiring /proc under Linux, and thus Closes: #221728
Diffstat (limited to 'cmdline/apt-get.cc')
-rw-r--r--cmdline/apt-get.cc4
1 files changed, 2 insertions, 2 deletions
diff --git a/cmdline/apt-get.cc b/cmdline/apt-get.cc
index 99cc35be6..2c7c99092 100644
--- a/cmdline/apt-get.cc
+++ b/cmdline/apt-get.cc
@@ -1,6 +1,6 @@
// -*- mode: cpp; mode: fold -*-
// Description /*{{{*/
-// $Id: apt-get.cc,v 1.145 2003/11/10 07:09:53 mdz Exp $
+// $Id: apt-get.cc,v 1.146 2003/11/19 23:50:51 mdz Exp $
/* ######################################################################
apt-get - Cover for dpkg
@@ -2468,7 +2468,7 @@ int main(int argc,const char *argv[])
}
// Deal with stdout not being a tty
- if (ttyname(STDOUT_FILENO) == 0 && _config->FindI("quiet",0) < 1)
+ if (isatty(STDOUT_FILENO) && _config->FindI("quiet",0) < 1)
_config->Set("quiet","1");
// Setup the output streams