1
1
Fork 0
mirror of https://github.com/NixOS/nix.git synced 2025-11-26 12:10:59 +01:00

Merged latest trunk revision R9332 into my state branch :)

This commit is contained in:
Wouter den Breejen 2007-10-08 14:09:02 +00:00
parent a94ea0fd61
commit 67022b7cca
22 changed files with 248 additions and 164 deletions

View file

@ -623,6 +623,18 @@ static void performOp(Source & from, Sink & to, unsigned int op)
writeInt(1, to);
break;
}
case wopSetOptions: {
keepFailed = readInt(from) != 0;
keepGoing = readInt(from) != 0;
tryFallback = readInt(from) != 0;
verbosity = (Verbosity) readInt(from);
maxBuildJobs = readInt(from);
maxSilentTime = readInt(from);
startWork();
stopWork();
break;
}
default:
throw Error(format("invalid operation %1%") % op);
@ -647,14 +659,19 @@ static void processConnection()
unsigned int magic = readInt(from);
if (magic != WORKER_MAGIC_1)
throw Error("protocol mismatch");
verbosity = (Verbosity) readInt(from);
writeInt(WORKER_MAGIC_2, to);
writeInt(PROTOCOL_VERSION, to);
unsigned int clientVersion = readInt(from);
/* Send startup error messages to the client. */
startWork();
try {
/* If we can't accept clientVersion, then throw an error
*here* (not above). */
/* Prevent users from doing something very dangerous. */
if (geteuid() == 0 &&
querySetting("build-users-group", "") == "")