Procházet zdrojové kódy

* apt-pkg/deb/dpkgpm.cc:
- make the apt/term.log output unbuffered (thanks to Matt Zimmerman)

Michael Vogt před 16 roky
rodič
revize
24baab5c47
2 změnil soubory, kde provedl 4 přidání a 1 odebrání
  1. 2 1
      apt-pkg/deb/dpkgpm.cc
  2. 2 0
      debian/changelog

+ 2 - 1
apt-pkg/deb/dpkgpm.cc

@@ -20,6 +20,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>
@@ -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);
    }

+ 2 - 0
debian/changelog

@@ -47,6 +47,8 @@ apt (0.7.25.4) UNRELEASED; urgency=low
     - install html doxygen in libapt-pkg-doc as well
   * methods/http.cc: 
     - code cleanup, add (some) doxygen strings
+  * apt-pkg/deb/dpkgpm.cc:
+    - make the apt/term.log output unbuffered (thanks to Matt Zimmerman)
 
   [ Robert Collins ]
   * Change the package index Info methods to allow apt-cache policy to be