helper/bwrap: generic extra file interface
All checks were successful
Build / Create distribution (push) Successful in 1m32s
Test / Run NixOS test (push) Successful in 3m50s

Signed-off-by: Ophestra <cat@gensokyo.uk>
This commit is contained in:
2025-01-19 19:18:22 +09:00
parent 2f70506865
commit eb0ef2d115
2 changed files with 22 additions and 11 deletions

View File

@@ -138,7 +138,11 @@ func Main() {
if b, err := helper.NewBwrap(
conf, innerInit,
nil, func(int, int) []string { return make([]string, 0) },
syncFd,
[]helper.BwrapExtraFile{
// keep this fd open while sandbox is running
// (--sync-fd FD)
{"--sync-fd", syncFd},
},
); err != nil {
fmsg.Fatalf("malformed sandbox config: %v", err)
} else {