diff options
| author | Ophestra <cat@gensokyo.uk> | 2025-10-31 22:34:38 +0900 |
|---|---|---|
| committer | Ophestra <cat@gensokyo.uk> | 2025-10-31 22:39:02 +0900 |
| commit | 68ff0a2ba624fc9c87a6feb331a01f64cdef4209 (patch) | |
| tree | 6ba673174995b8c4c3d35460625cc90af4b2d85d /container/params.go | |
| parent | 6a0ecced9021482f1f2f05d6ec63c1e4cd33c8a0 (diff) | |
container/params: expose pipe
This increases flexibility of how caller wants to handle the I/O. Also makes it no longer rely on finalizer.
Signed-off-by: Ophestra <cat@gensokyo.uk>
Diffstat (limited to 'container/params.go')
| -rw-r--r-- | container/params.go | 4 |
1 files changed, 2 insertions, 2 deletions
diff --git a/container/params.go b/container/params.go index a48eabaf..46c3b9b2 100644 --- a/container/params.go +++ b/container/params.go @@ -9,13 +9,13 @@ import ( ) // Setup appends the read end of a pipe for setup params transmission and returns its fd. -func Setup(extraFiles *[]*os.File) (int, *gob.Encoder, error) { +func Setup(extraFiles *[]*os.File) (int, *os.File, error) { if r, w, err := os.Pipe(); err != nil { return -1, nil, err } else { fd := 3 + len(*extraFiles) *extraFiles = append(*extraFiles, r) - return fd, gob.NewEncoder(w), nil + return fd, w, nil } } |
