mirror of
https://github.com/NixOS/nix
synced 2025-06-28 17:51:15 +02:00
Use vfork
This commit is contained in:
parent
b5ed5b6e66
commit
0e8fc118b3
3 changed files with 39 additions and 11 deletions
|
@ -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;
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue