aboutsummaryrefslogtreecommitdiff
path: root/src/libutil/util.hh
diff options
context:
space:
mode:
authorEelco Dolstra <edolstra@gmail.com>2021-11-08 21:12:51 +0100
committerEelco Dolstra <edolstra@gmail.com>2021-11-08 21:12:51 +0100
commit7a71621b7c43d7d2f264cc495fb7ceb66455fd3c (patch)
tree5781dae8522739f74671f15a6a6a43a964bde4f4 /src/libutil/util.hh
parent6c2af1f201a925c2aa632737765685c72b642847 (diff)
parentfcb8af550f5fca37458da0d9042a2b59523eb304 (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.hh10
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