Skip to content

Read and parse all of /proc/net/dev_mcast#2565

Open
hexchain wants to merge 1 commit intozerotier:devfrom
hexchain:read-mcast-full
Open

Read and parse all of /proc/net/dev_mcast#2565
hexchain wants to merge 1 commit intozerotier:devfrom
hexchain:read-mcast-full

Conversation

@hexchain
Copy link

Reading from Linux procfs with a single read() does not guarantee reading of the full buffer length. Sometimes, read() returns with some data (less than the buffer length) but the file isn't completely consumed.

This patch switches file reading to C++ fstream and uses its line-reading API to ensure the file can be fully read, without doing any buffer offset dance ourselves.

Reading from Linux procfs with a single read() does not guarantee
reading of the full buffer length.
@CLAassistant
Copy link

CLAassistant commented Feb 15, 2026

CLA assistant check
All committers have signed the CLA.

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.

2 participants

Comments