瀏覽代碼

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

Michael Vogt 16 年之前
父節點
當前提交
115ba31b90
共有 2 個文件被更改,包括 5 次插入1 次删除
  1. 1 1
      apt-pkg/deb/dpkgpm.cc
  2. 4 0
      debian/changelog

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

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

+ 4 - 0
debian/changelog

@@ -41,6 +41,10 @@ apt (0.7.26~exp8) UNRELEASED; urgency=low
     - make the used MMap moveable (and therefore dynamic resizeable) by
       applying (some) mad pointer magic (Closes: #195018)
 
+  [ Michael Vogt ]
+  * apt-pkg/deb/dpkgpm.cc:
+    - make the apt/term.log output unbuffered (thanks to Matt Zimmerman)
+
   [ Julian Andres Klode ]
   * methods/ftp.h:
     - Handle different logins on the same server (Closes: #586904).