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

nsenter: fix repeat close() operations #2481

Merged
merged 1 commit into from
Jun 20, 2020
Merged

Conversation

uudiin
Copy link
Contributor

@uudiin uudiin commented Jun 19, 2020

It is obvious that the loop at the first place executes at least
twice, and the close() call after the first time always returns
an EBADF error, so move these operations outside the loop that
do not need to be repeated.

Signed-off-by: Tianjia Zhang [email protected]

It is obvious that the loop at the first place executes at least
twice, and the close() call after the first time always returns
an EBADF error, so move these operations outside the loop that
do not need to be repeated.

Signed-off-by: Tianjia Zhang <[email protected]>
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.

Good catch, thanks!

LGTM

Copy link
Member

@cyphar cyphar left a comment

Choose a reason for hiding this comment

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

LGTM, thanks.

@cyphar cyphar closed this in 0fa097f Jun 20, 2020
@cyphar cyphar merged commit 0fa097f into opencontainers:master Jun 20, 2020
@kolyshkin kolyshkin mentioned this pull request Mar 6, 2021
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.

3 participants