From ea1e3ebae993a3d89302940dc1649b627c420aa1 Mon Sep 17 00:00:00 2001 From: Ophestra Date: Sat, 23 Aug 2025 00:16:46 +0900 Subject: container/params: pass fd instead of file The file is very difficult to stub. Pass fd instead as it is the value that is actually useful. Signed-off-by: Ophestra --- container/dispatcher.go | 6 +++--- 1 file changed, 3 insertions(+), 3 deletions(-) (limited to 'container/dispatcher.go') diff --git a/container/dispatcher.go b/container/dispatcher.go index 86837b9d..78648a7f 100644 --- a/container/dispatcher.go +++ b/container/dispatcher.go @@ -45,7 +45,7 @@ type syscallDispatcher interface { // isatty provides [Isatty]. isatty(fd int) bool // receive provides [Receive]. - receive(key string, e any, v **os.File) (closeFunc func() error, err error) + receive(key string, e any, fdp *uintptr) (closeFunc func() error, err error) // bindMount provides procPaths.bindMount. bindMount(source, target string, flags uintptr, eq bool) error @@ -152,8 +152,8 @@ func (direct) capBoundingSetDrop(cap uintptr) error { return capBound func (direct) capAmbientClearAll() error { return capAmbientClearAll() } func (direct) capAmbientRaise(cap uintptr) error { return capAmbientRaise(cap) } func (direct) isatty(fd int) bool { return Isatty(fd) } -func (direct) receive(key string, e any, v **os.File) (func() error, error) { - return Receive(key, e, v) +func (direct) receive(key string, e any, fdp *uintptr) (func() error, error) { + return Receive(key, e, fdp) } func (direct) bindMount(source, target string, flags uintptr, eq bool) error { -- cgit v1.3.1