mirror of
https://github.com/NixOS/nix
synced 2025-06-27 04:21:16 +02:00
Ignore EPERM when unsharing FS state
On Docker (but not podman), unshare(CLONE_FS) fails with EPERM. So let's ignore it and hope nothing bad happens. Attempted fix for #5777.
This commit is contained in:
parent
c260640dec
commit
ec8f24ed3a
3 changed files with 14 additions and 7 deletions
|
@ -311,6 +311,11 @@ void saveMountNamespace();
|
|||
if saveMountNamespace() was never called. */
|
||||
void restoreMountNamespace();
|
||||
|
||||
/* Cause this thread to not share any FS attributes with the main
|
||||
thread, because this causes setns() in restoreMountNamespace() to
|
||||
fail. */
|
||||
void unshareFilesystem();
|
||||
|
||||
|
||||
class ExecError : public Error
|
||||
{
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue