1
0
Fork 0
mirror of https://github.com/NixOS/nix synced 2025-07-06 21:41:48 +02:00

Ensure we're writing to stderr in the builder

http://hydra.nixos.org/build/17862041
This commit is contained in:
Eelco Dolstra 2014-12-12 14:35:44 +01:00
parent 5a2d451648
commit 28f22b4653
6 changed files with 21 additions and 19 deletions

View file

@ -191,7 +191,7 @@ void LocalStore::addTempRoot(const Path & path)
lockFile(fdTempRoots, ltWrite, true);
string s = path + '\0';
writeFull(fdTempRoots, (const unsigned char *) s.data(), s.size());
writeFull(fdTempRoots, s);
/* Downgrade to a read lock. */
debug(format("downgrading to read lock on %1%") % fnTempRoots);
@ -231,7 +231,7 @@ static void readTempRoots(PathSet & tempRoots, FDs & fds)
if (lockFile(*fd, ltWrite, false)) {
printMsg(lvlError, format("removing stale temporary roots file %1%") % path);
unlink(path.c_str());
writeFull(*fd, (const unsigned char *) "d", 1);
writeFull(*fd, "d");
continue;
}