mirror of
https://github.com/NixOS/nix
synced 2025-06-27 08:31:16 +02:00
* 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
|
@ -85,10 +85,11 @@ unsigned int readInt(Source & source)
|
|||
string readString(Source & source)
|
||||
{
|
||||
unsigned int len = readInt(source);
|
||||
char buf[len];
|
||||
source((unsigned char *) buf, len);
|
||||
unsigned char * buf = new unsigned char[len];
|
||||
AutoDeleteArray<unsigned char> d(buf);
|
||||
source(buf, len);
|
||||
readPadding(len, source);
|
||||
return string(buf, len);
|
||||
return string((char *) buf, len);
|
||||
}
|
||||
|
||||
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue