mirror of
https://github.com/NixOS/nix
synced 2025-06-27 00:11:17 +02:00
Fix 'Read-only file system' when building a derivation
This commit is contained in:
parent
32a0a223d5
commit
a32ff2573b
3 changed files with 5 additions and 1 deletions
|
@ -936,7 +936,8 @@ pid_t startProcess(std::function<void()> fun, const ProcessOptions & options)
|
|||
throw SysError("setting death signal");
|
||||
#endif
|
||||
restoreAffinity();
|
||||
restoreMountNamespace();
|
||||
if (options.restoreMountNamespace)
|
||||
restoreMountNamespace();
|
||||
fun();
|
||||
} catch (std::exception & e) {
|
||||
try {
|
||||
|
|
|
@ -250,6 +250,7 @@ struct ProcessOptions
|
|||
bool dieWithParent = true;
|
||||
bool runExitHandlers = false;
|
||||
bool allowVfork = true;
|
||||
bool restoreMountNamespace = true;
|
||||
};
|
||||
|
||||
pid_t startProcess(std::function<void()> fun, const ProcessOptions & options = ProcessOptions());
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue