fst/config: allocate filesystem slice
All checks were successful
Tests / Go tests (push) Successful in 32s
Nix / NixOS tests (push) Successful in 4m5s

Signed-off-by: Ophestra <cat@gensokyo.uk>
This commit is contained in:
Ophestra 2025-01-04 00:16:41 +09:00
parent 6acd0d4e88
commit a1148edd00
Signed by: cat
SSH Key Fingerprint: SHA256:gQ67O0enBZ7UdZypgtspB2FDM1g3GVw8nX0XSdcFw8Q

View File

@ -141,6 +141,12 @@ func (s *SandboxConfig) Bwrap(os linux.System) (*bwrap.Config, error) {
Hostname: s.Hostname,
Clearenv: true,
SetEnv: s.Env,
/* this is only 4 KiB of memory on a 64-bit system,
permissive defaults on NixOS results in around 100 entries
so this capacity should eliminate copies for most setups */
Filesystem: make([]bwrap.FSBuilder, 0, 256),
NewSession: !s.NoNewSession,
DieWithParent: true,
AsInit: true,