1
0
Fork 0
mirror of https://github.com/NixOS/nix synced 2025-07-06 21:41:48 +02:00

tryUnshareFilesystem: Ignore ENOSYS too

Fixes #10747
This commit is contained in:
John Ericson 2024-05-22 16:04:40 -04:00
parent d5fdfdc592
commit dc7615dbbb
3 changed files with 7 additions and 5 deletions

View file

@ -137,9 +137,9 @@ void restoreMountNamespace()
}
}
void unshareFilesystem()
void tryUnshareFilesystem()
{
if (unshare(CLONE_FS) != 0 && errno != EPERM)
if (unshare(CLONE_FS) != 0 && errno != EPERM && errno != ENOSYS)
throw SysError("unsharing filesystem state");
}