From eb0ef2d1151fbca484bf0c82667a511dbd0cb80b Mon Sep 17 00:00:00 2001 From: Ophestra Date: Sun, 19 Jan 2025 19:18:22 +0900 Subject: helper/bwrap: generic extra file interface Signed-off-by: Ophestra --- internal/proc/priv/shim/main.go | 6 +++++- 1 file changed, 5 insertions(+), 1 deletion(-) (limited to 'internal/proc/priv') diff --git a/internal/proc/priv/shim/main.go b/internal/proc/priv/shim/main.go index 49ec7f1a..6bd08343 100644 --- a/internal/proc/priv/shim/main.go +++ b/internal/proc/priv/shim/main.go @@ -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 { -- cgit v1.3.1