From 24baab5c477bf1e57a0b169a7bac1d2e9ab0c974 Mon Sep 17 00:00:00 2001 From: Michael Vogt Date: Wed, 7 Jul 2010 16:47:09 +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') diff --git a/apt-pkg/deb/dpkgpm.cc b/apt-pkg/deb/dpkgpm.cc index 8abe3f5c6..2bbc7a4ba 100644 --- a/apt-pkg/deb/dpkgpm.cc +++ b/apt-pkg/deb/dpkgpm.cc @@ -20,6 +20,7 @@ #include #include #include +#include #include #include #include @@ -582,7 +583,7 @@ bool pkgDPkgPM::OpenLog() term_out = fopen(logfile_name.c_str(),"a"); if (term_out == NULL) return _error->WarningE(_("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