]> git.saurik.com Git - apt.git/commitdiff
* apt-pkg/deb/dpkgpm.cc:
authorMichael Vogt <michael.vogt@ubuntu.com>
Thu, 8 Jul 2010 07:08:57 +0000 (09:08 +0200)
committerMichael Vogt <michael.vogt@ubuntu.com>
Thu, 8 Jul 2010 07:08:57 +0000 (09:08 +0200)
  - make the apt/term.log output unbuffered (thanks to Matt Zimmerman)

apt-pkg/deb/dpkgpm.cc
debian/changelog

index 036f0e3856cac8565332656fd2c38d0b44d3091c..935cbb748fd145c8a0145648c4df76cbd7898aec 100644 (file)
@@ -21,6 +21,7 @@
 #include <stdlib.h>
 #include <fcntl.h>
 #include <sys/select.h>
+#include <sys/stat.h>
 #include <sys/types.h>
 #include <sys/wait.h>
 #include <signal.h>
@@ -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);
    }
index f1e0a97ed4d6634e728e48017c251fef1949f95c..2450b406a518897b81af179a02df9d6452e103eb 100644 (file)
@@ -1,3 +1,10 @@
+apt (0.7.25.3ubuntu11) UNRELEASED; urgency=low
+
+  * apt-pkg/deb/dpkgpm.cc:
+    - make the apt/term.log output unbuffered (thanks to Matt Zimmerman)
+
+ -- Michael Vogt <michael.vogt@ubuntu.com>  Thu, 08 Jul 2010 09:08:37 +0200
+
 apt (0.7.25.3ubuntu10) maverick; urgency=low
 
   [ Michael Vogt ]