You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
the return value of 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.
The text was updated successfully, but these errors were encountered:
In
go-systemd/activation/files_unix.go
Line 66 in f5f8d59
os.NewFile
should be checked beforefiles
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. Ifos.NewFile
fails, just returningnil
might be reasonable, even if it means close-on-exec is set on some file descriptors.The text was updated successfully, but these errors were encountered: