Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

init: use *os.File for passed file descriptors #4175

Merged
merged 1 commit into from
Jan 31, 2024

Conversation

cyphar
Copy link
Member

@cyphar cyphar commented Jan 20, 2024

While it doesn't make much of a practical difference, it seems far more reasonable to use os.NewFile to wrap all of our passed file descriptors to make sure they're tracked by the Go runtime and that we don't double-close them.

Signed-off-by: Aleksa Sarai cyphar@cyphar.com

@cyphar cyphar added this to the 1.2.0 milestone Jan 20, 2024
While it doesn't make much of a practical difference, it seems far more
reasonable to use os.NewFile to wrap all of our passed file descriptors
to make sure they're tracked by the Go runtime and that we don't
double-close them.

Signed-off-by: Aleksa Sarai <cyphar@cyphar.com>
@lifubang
Copy link
Member

lifubang commented Jan 22, 2024

I have updated #4173 , but after I see this PR, I think these two PRs are related, could you mind carry #4173 in here?
Sorry, no related.

Copy link
Contributor

@kolyshkin kolyshkin left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

LGTM

@kolyshkin kolyshkin merged commit 8454bbb into opencontainers:main Jan 31, 2024
45 checks passed
@cyphar cyphar deleted the fd-file-switch branch January 31, 2024 21:48
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

4 participants