aboutsummaryrefslogtreecommitdiffhomepage
path: root/container/params.go
diff options
context:
space:
mode:
authorOphestra <cat@gensokyo.uk>2025-08-09 17:36:36 +0900
committerOphestra <cat@gensokyo.uk>2025-08-09 17:37:46 +0900
commit82608164f66dda428189bdc3610f027820408b49 (patch)
tree8252de6260fcb4d6d050f5c1ca544fe8d2f7544f /container/params.go
parentedd6f2cfa9b08c5c43cea545f9ecc8b5021cf9d6 (diff)
container/params: remove confusingly named error
Signed-off-by: Ophestra <cat@gensokyo.uk>
Diffstat (limited to 'container/params.go')
-rw-r--r--container/params.go6
1 files changed, 3 insertions, 3 deletions
diff --git a/container/params.go b/container/params.go
index e4328a7b..a5b4f2f1 100644
--- a/container/params.go
+++ b/container/params.go
@@ -5,11 +5,11 @@ import (
"errors"
"os"
"strconv"
+ "syscall"
)
var (
- ErrNotSet = errors.New("environment variable not set")
- ErrInvalid = errors.New("bad file descriptor")
+ ErrNotSet = errors.New("environment variable not set")
)
// Setup appends the read end of a pipe for setup params transmission and returns its fd.
@@ -35,7 +35,7 @@ func Receive(key string, e any, v **os.File) (func() error, error) {
} else {
setup = os.NewFile(uintptr(fd), "setup")
if setup == nil {
- return nil, ErrInvalid
+ return nil, syscall.EBADF
}
if v != nil {
*v = setup