[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]
04/05: daemon: Flush upon '\r' when reading the substituter's stderr.
From: |
Ludovic Courtès |
Subject: |
04/05: daemon: Flush upon '\r' when reading the substituter's stderr. |
Date: |
Sat, 07 Feb 2015 22:17:52 +0000 |
civodul pushed a commit to branch master
in repository guix.
commit 9ba0b8d3d09a83c03ea3e296239e5e8c986a6bb7
Author: Ludovic Courtès <address@hidden>
Date: Mon Jan 5 22:51:03 2015 +0100
daemon: Flush upon '\r' when reading the substituter's stderr.
* nix/libstore/local-store.cc (LocalStore::getLineFromSubstituter):
Flush when the line contains '\r'.
---
nix/libstore/local-store.cc | 6 ++++--
1 files changed, 4 insertions(+), 2 deletions(-)
diff --git a/nix/libstore/local-store.cc b/nix/libstore/local-store.cc
index 5d210ae..2c3d652 100644
--- a/nix/libstore/local-store.cc
+++ b/nix/libstore/local-store.cc
@@ -1168,8 +1168,10 @@ string
LocalStore::getLineFromSubstituter(RunningSubstituter & run)
if (n == 0) throw EndOfFile(format("substituter `%1%' died
unexpectedly") % run.program);
err.append(buf, n);
string::size_type p;
- while ((p = err.find('\n')) != string::npos) {
- printMsg(lvlError, run.program + ": " + string(err, 0, p));
+ while (((p = err.find('\n')) != string::npos)
+ || ((p = err.find('\r')) != string::npos)) {
+ string thing(err, 0, p + 1);
+ writeToStderr(run.program + ": " + thing);
err = string(err, p + 1);
}
}
- branch master updated (5cc0e48 -> cce629c), Ludovic Courtès, 2015/02/07
- 01/05: gnu: gimp: Add EXIF and SVG support, plus color management., Ludovic Courtès, 2015/02/07
- 02/05: doc: Document the location of the build directory., Ludovic Courtès, 2015/02/07
- 04/05: daemon: Flush upon '\r' when reading the substituter's stderr.,
Ludovic Courtès <=
- 05/05: Thank Andrei., Ludovic Courtès, 2015/02/07
- 03/05: serialization: Check for EOF and incomplete input conditions., Ludovic Courtès, 2015/02/07