From 60aa7b0d5bd08cc5d5a0eaa74600090c2cece17e Mon Sep 17 00:00:00 2001 From: Michael Vogt Date: Thu, 8 Jul 2010 09:08:57 +0200 Subject: * apt-pkg/deb/dpkgpm.cc: - make the apt/term.log output unbuffered (thanks to Matt Zimmerman) --- apt-pkg/deb/dpkgpm.cc | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) (limited to 'apt-pkg/deb') diff --git a/apt-pkg/deb/dpkgpm.cc b/apt-pkg/deb/dpkgpm.cc index 036f0e385..935cbb748 100644 --- a/apt-pkg/deb/dpkgpm.cc +++ b/apt-pkg/deb/dpkgpm.cc @@ -21,6 +21,7 @@ #include #include #include +#include #include #include #include @@ -593,7 +594,7 @@ bool pkgDPkgPM::OpenLog() term_out = fopen(logfile_name.c_str(),"a"); if (term_out == NULL) return _error->WarningE("OpenLog", _("Could not open file '%s'"), logfile_name.c_str()); - + setvbuf(term_out, NULL, _IONBF, 0); chmod(logfile_name.c_str(), 0600); fprintf(term_out, "\nLog started: %s\n", timestr); } -- cgit v1.2.3