aboutsummaryrefslogtreecommitdiffhomepage
path: root/container/dispatcher.go
diff options
context:
space:
mode:
authorOphestra <cat@gensokyo.uk>2025-08-23 00:16:46 +0900
committerOphestra <cat@gensokyo.uk>2025-08-23 00:16:46 +0900
commitea1e3ebae993a3d89302940dc1649b627c420aa1 (patch)
tree14bc57e3b04cde10394174c407c836d4ed25b113 /container/dispatcher.go
parent1c692bfb7926c0f28cf7f38ca7b49f4941fd2b90 (diff)
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 <cat@gensokyo.uk>
Diffstat (limited to 'container/dispatcher.go')
-rw-r--r--container/dispatcher.go6
1 files changed, 3 insertions, 3 deletions
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 {