diff options
author | Kane York <kanepyork@gmail.com> | 2020-07-24T02·10-0700 |
---|---|---|
committer | kanepyork <rikingcoding@gmail.com> | 2020-07-24T22·16+0000 |
commit | bd770907034609dcdb927c3a75b6a98eff4f23e7 (patch) | |
tree | ae8ac85322ebf8bbf67ffd38ce91db50f7359b6e /third_party/nix/src/libstore | |
parent | 388b5f1abe8947978592d9778a5669e634b6e552 (diff) |
fix(3p/nix): do not call vfork r/1457
The use of vfork() in Nix is entirely illegal. Quote: If the process created by vfork() returns from the function in which vfork() was called, or calls any other function before successfully calling _exit() or one of the exec*() family of functions, the behavior is undefined. -- Linux man-pages, release 5.05 Add a TODO to use the higher-performance variants of clone() on Linux when it is available. Change-Id: I42370e1568ad6e2d00d70d0b66c8aded8f1288bb Reviewed-on: https://cl.tvl.fyi/c/depot/+/1418 Tested-by: BuildkiteCI Reviewed-by: tazjin <mail@tazj.in> Reviewed-by: Alyssa Ross <hi@alyssa.is>
Diffstat (limited to 'third_party/nix/src/libstore')
-rw-r--r-- | third_party/nix/src/libstore/build.cc | 3 |
1 files changed, 0 insertions, 3 deletions
diff --git a/third_party/nix/src/libstore/build.cc b/third_party/nix/src/libstore/build.cc index da35388d855a..74db67e862a7 100644 --- a/third_party/nix/src/libstore/build.cc +++ b/third_party/nix/src/libstore/build.cc @@ -2342,8 +2342,6 @@ void DerivationGoal::startBuilder() { userNamespaceSync.create(); - options.allowVfork = false; - Pid helper = startProcess( [&]() { /* Drop additional groups here because we can't do it @@ -2443,7 +2441,6 @@ void DerivationGoal::startBuilder() { #endif { fallback: - options.allowVfork = !buildUser && !drv->isBuiltin(); pid = startProcess([&]() { runChild(); }, options); } |