mirror of
https://github.com/NixOS/nix
synced 2025-06-27 12:41:15 +02:00
Start factoring out Unix assumptions
This splits files and adds new identifiers in preperation for supporting windows, but no Windows-specific code is actually added yet. Co-authored-by: Robert Hensing <roberth@users.noreply.github.com>
This commit is contained in:
parent
852391765d
commit
02fa20622f
34 changed files with 352 additions and 296 deletions
|
@ -2,7 +2,6 @@
|
|||
#include <cstring>
|
||||
|
||||
#include "current-process.hh"
|
||||
#include "namespaces.hh"
|
||||
#include "util.hh"
|
||||
#include "finally.hh"
|
||||
#include "file-system.hh"
|
||||
|
@ -17,6 +16,7 @@
|
|||
# include <mutex>
|
||||
# include <sys/resource.h>
|
||||
# include "cgroup.hh"
|
||||
# include "namespaces.hh"
|
||||
#endif
|
||||
|
||||
#include <sys/mount.h>
|
||||
|
@ -84,7 +84,9 @@ void restoreProcessContext(bool restoreMounts)
|
|||
{
|
||||
restoreSignals();
|
||||
if (restoreMounts) {
|
||||
#if __linux__
|
||||
restoreMountNamespace();
|
||||
#endif
|
||||
}
|
||||
|
||||
if (savedStackSize) {
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue