diff options
author | Eelco Dolstra <eelco.dolstra@logicblox.com> | 2014-12-10T15·35+0100 |
---|---|---|
committer | Eelco Dolstra <eelco.dolstra@logicblox.com> | 2014-12-10T16·25+0100 |
commit | 0e8fc118b3d2d3bb6f9b0a918bf8ceb3927774cd (patch) | |
tree | 5f022418fc293841c649dceacd26e88e8a464c57 /src/nix-daemon | |
parent | b5ed5b6e666e9d1e23b7cbc815684bfef52c3d41 (diff) |
Use vfork
Diffstat (limited to 'src/nix-daemon')
-rw-r--r-- | src/nix-daemon/nix-daemon.cc | 7 |
1 files changed, 6 insertions, 1 deletions
diff --git a/src/nix-daemon/nix-daemon.cc b/src/nix-daemon/nix-daemon.cc index 3864ab935de0..9a8f469ade2e 100644 --- a/src/nix-daemon/nix-daemon.cc +++ b/src/nix-daemon/nix-daemon.cc @@ -799,6 +799,11 @@ static void daemonLoop(char * * argv) % (peer.uidKnown ? user : "<unknown>")); /* Fork a child to handle the connection. */ + ProcessOptions options; + options.errorPrefix = "unexpected Nix daemon error: "; + options.dieWithParent = false; + options.runExitHandlers = true; + options.allowVfork = false; startProcess([&]() { fdSocket.close(); @@ -821,7 +826,7 @@ static void daemonLoop(char * * argv) processConnection(trusted); exit(0); - }, false, "unexpected Nix daemon error: ", true); + }, options); } catch (Interrupted & e) { throw; |