diff options
author | Eelco Dolstra <edolstra@gmail.com> | 2021-11-08 21:12:51 +0100 |
---|---|---|
committer | Eelco Dolstra <edolstra@gmail.com> | 2021-11-08 21:12:51 +0100 |
commit | 7a71621b7c43d7d2f264cc495fb7ceb66455fd3c (patch) | |
tree | 5781dae8522739f74671f15a6a6a43a964bde4f4 /src/libutil/util.hh | |
parent | 6c2af1f201a925c2aa632737765685c72b642847 (diff) | |
parent | fcb8af550f5fca37458da0d9042a2b59523eb304 (diff) |
Merge branch 'fix-writable-shell' of https://github.com/yorickvP/nix
Diffstat (limited to 'src/libutil/util.hh')
-rw-r--r-- | src/libutil/util.hh | 10 |
1 files changed, 9 insertions, 1 deletions
diff --git a/src/libutil/util.hh b/src/libutil/util.hh index 485ff4153..708e01cf8 100644 --- a/src/libutil/util.hh +++ b/src/libutil/util.hh @@ -300,7 +300,15 @@ void setStackSize(size_t stackSize); /* Restore the original inherited Unix process context (such as signal masks, stack size, CPU affinity). */ -void restoreProcessContext(); +void restoreProcessContext(bool restoreMounts = true); + +/* Save the current mount namespace. Ignored if called more than + once. */ +void saveMountNamespace(); + +/* Restore the mount namespace saved by saveMountNamespace(). Ignored + if saveMountNamespace() was never called. */ +void restoreMountNamespace(); class ExecError : public Error |