Repository navigation
Set SOCK_CLOEXEC for sockets (hardcoded via poco update) - #21695
Merged
Merged
Conversation
azat
force-pushed
the
O_CLOEXEC-for-listen-sockets
branch
from
March 13, 2021 07:23
fd75731 to
f3c4179
Compare
azat
force-pushed
the
O_CLOEXEC-for-listen-sockets
branch
from
March 13, 2021 07:23
f3c4179 to
1f5bf5a
Compare
Found this in [1]:
[Detaching after fork from child process 184152]
...
Cannot get server pid with {}, got {}: {} lsof -i tcp:9000 -s tcp:LISTEN -Fp | awk '/^p[0-9]+$/{print substr($0, 2)}' b'301\n184152\n' invalid literal for int() with base 10: b'301\n184152\n'
But the major idea is that parent process should not export any file
descriptors to childrens, otherwise this may create security and other
breaches (like extra pipe endpoints, ...)
[1]: https://clickhouse-test-reports.s3.yandex.net/21511/d7d9638ceb6bd702f34a88ee54f8f83197e90af5/stress_test_(address).html#fail1
Refs: ClickHouse/poco#35
azat
force-pushed
the
O_CLOEXEC-for-listen-sockets
branch
from
March 13, 2021 10:00
1f5bf5a to
092b0b4
Compare
This was referenced Oct 14, 2026
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
Changelog category (leave one):
Changelog entry (a user-readable short description of the changes that goes to CHANGELOG.md):
Set SOCK_CLOEXEC for sockets (hardcoded via poco update)
Detailed description / Documentation draft:
Found this in 1, multiple processes has LISTEN socket for :9000:
But the major idea is that parent process should not export any file
descriptors to childrens, otherwise this may create security and other
breaches (like extra pipe endpoints, ...)
Refs: ClickHouse/poco#35
Follow-up-for: #9174