* Daemon mode (`nix-worker --daemon'). Clients connect to the server
via the Unix domain socket in /nix/var/nix/daemon.socket. The server forks a worker process per connection. * readString(): use the heap, not the stack. * Some protocol fixes.
This commit is contained in:
parent
4740baf3a6
commit
0130ef88ea
7 changed files with 182 additions and 53 deletions
|
@ -39,10 +39,11 @@ RemoteStore::RemoteStore()
|
|||
|
||||
/* Send the magic greeting, check for the reply. */
|
||||
try {
|
||||
processStderr();
|
||||
writeInt(WORKER_MAGIC_1, to);
|
||||
writeInt(verbosity, to);
|
||||
unsigned int magic = readInt(from);
|
||||
if (magic != WORKER_MAGIC_2) throw Error("protocol mismatch");
|
||||
processStderr();
|
||||
} catch (Error & e) {
|
||||
throw Error(format("cannot start worker (%1%)")
|
||||
% e.msg());
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue