mirror of
https://github.com/privatevoid-net/nix-super.git
synced 2024-11-27 00:06:16 +02:00
libutil: try
restoring the cwd from fdSavedCwd
This commit is contained in:
parent
e135d223f6
commit
f89b0f7846
1 changed files with 3 additions and 3 deletions
|
@ -1717,12 +1717,12 @@ void restoreMountNamespace()
|
||||||
try {
|
try {
|
||||||
if (fdSavedMountNamespace && setns(fdSavedMountNamespace.get(), CLONE_NEWNS) == -1)
|
if (fdSavedMountNamespace && setns(fdSavedMountNamespace.get(), CLONE_NEWNS) == -1)
|
||||||
throw SysError("restoring parent mount namespace");
|
throw SysError("restoring parent mount namespace");
|
||||||
} catch (Error & e) {
|
|
||||||
debug(e.msg());
|
|
||||||
}
|
|
||||||
if (fdSavedCwd && fchdir(fdSavedCwd.get()) == -1) {
|
if (fdSavedCwd && fchdir(fdSavedCwd.get()) == -1) {
|
||||||
throw SysError("restoring cwd");
|
throw SysError("restoring cwd");
|
||||||
}
|
}
|
||||||
|
} catch (Error & e) {
|
||||||
|
debug(e.msg());
|
||||||
|
}
|
||||||
#endif
|
#endif
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
Loading…
Reference in a new issue