// -*- mode: cpp; mode: fold -*-
// Description /*{{{*/
-// $Id: apt-cache.cc,v 1.67 2003/08/02 19:53:23 mdz Exp $
+// $Id: apt-cache.cc,v 1.68 2003/11/19 23:50:51 mdz Exp $
/* ######################################################################
apt-cache - Manages the cache files
}
// 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");
if (CmdL.DispatchArg(CmdsA,false) == false && _error->PendingError() == false)
// -*- mode: cpp; mode: fold -*-
// Description /*{{{*/
-// $Id: apt-cdrom.cc,v 1.44 2003/09/12 01:48:33 mdz Exp $
+// $Id: apt-cdrom.cc,v 1.45 2003/11/19 23:50:51 mdz Exp $
/* ######################################################################
APT CDROM - Tool for handling APT's CDROM database.
return ShowHelp();
// 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");
// Match the operation
// -*- 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
}
// 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
* Let apt-get build-dep try alternatives if the installed package
doesn't meet version requirements (Closes: #214736)
* Fix version display for recommends (Closes: #219900)
+ * 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
--