-
Notifications
You must be signed in to change notification settings - Fork 328
Open
Description
In
go-systemd/activation/files_unix.go
Line 66 in f5f8d59
| files = append(files, os.NewFile(uintptr(fd), name)) |
os.NewFile should be checked before files is changed. It can fail if the environment variables don't match the file descriptor table, e.g. LISTEN_FDS is much larger than the number of open files. The current logic would force consumers of the interface to check for this condition or run into mysterious panics in a completely unrelated code. If os.NewFile fails, just returning nil might be reasonable, even if it means close-on-exec is set on some file descriptors.Reactions are currently unavailable
Metadata
Metadata
Assignees
Labels
No labels