-
Notifications
You must be signed in to change notification settings - Fork 2.4k
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
podman service: close duplicated /dev/null fd #16901
podman service: close duplicated /dev/null fd #16901
Conversation
Since we open /dev/null to set it as STDIN we can close it after the dup2() call. Using defer is not good enough since this function will never exit since the http server will block. This is not a problem but it reduces the open fds from the service by one. [NO NEW TESTS NEEDED] Signed-off-by: Paul Holzinger <[email protected]>
LGTM |
@vrothberg @giuseppe @flouthoc @containers/podman-maintainers PTAL |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
LGTM
/lgtm |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
LGTM
/lgtm
/approve
[APPROVALNOTIFIER] This PR is APPROVED This pull-request has been approved by: flouthoc, giuseppe, Luap99 The full list of commands accepted by this bot can be found here. The pull request process is described here
Needs approval from an approver in each of these files:
Approvers can indicate their approval by writing |
Install the signal proxy before attaching to/starting the container to make sure there's no race-condition as revealed in the failing start/run tests in containers#16901. The tests had the valid expectation that signal forwarding works once the container is running. Further update the tests to account for the attach test where the expectation is that signal forwarding works once Podman has attached to container (or even before). Fixes: containers#16901 Signed-off-by: Valentin Rothberg <[email protected]> Signed-off-by: Ed Santiago <[email protected]>
Install the signal proxy before attaching to/starting the container to make sure there's no race-condition as revealed in the failing start/run tests in containers#16901. The tests had the valid expectation that signal forwarding works once the container is running. Further update the tests to account for the attach test where the expectation is that signal forwarding works once Podman has attached to container (or even before). Fixes: containers#16901 Signed-off-by: Valentin Rothberg <[email protected]> Signed-off-by: Ed Santiago <[email protected]>
Since we open /dev/null to set it as STDIN we can close it after the dup2() call. Using defer is not good enough since this function will never exit since the http server will block. This is not a problem but it reduces the open fds from the service by one.
[NO NEW TESTS NEEDED]
Does this PR introduce a user-facing change?