Skip to content

SapMachine #2457: Handle space in process names when parsing /proc/<pid>/stat - #2458

Merged
schmelter-sap merged 4 commits into
SAP:sapmachinefrom
schmelter-sap:more-robust-proc-pid-stat-parsing
Nov 2, 2026
Merged

schmelter-sap merged 4 commits into
SAP:sapmachinefrom
schmelter-sap:more-robust-proc-pid-stat-parsing

Conversation

@schmelter-sap

@schmelter-sap schmelter-sap commented Nov 1, 2026 •

Copy link
Copy Markdown
Member

Handle process names with a space character when parsing /proc/<pid>/stat to get the number of threads of a process.

Since after the process name is a closing parenthesis, which cannot occur during the rest of the line, we search for the last ')' and then start parsing from there on.

fixes #2457

@sapmachine-bot

Copy link
Copy Markdown
Contributor

Hello @schmelter-sap, this pull request fulfills all formal requirements.

@schmelter-sap
schmelter-sap merged commit 93f7e7d into SAP:sapmachine Nov 2, 2026
128 of 130 checks passed
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.

Handle space in process names when parsing /proc/<pid>/stat

3 participants