snehavats1404 opened a new pull request, #2868: URL: https://github.com/apache/brpc/pull/2868
### What problem does this PR solve? Issue Number:1251 Problem Summary: The read_command_name function previously used /proc/self/stat to retrieve command names, which could lead to incorrect handling of command names, especially those enclosed in parentheses. This change improves accuracy and robustness by switching to /proc/self/cmdline and normalizing the command names. ### What is changed and the side effects? Changed: Replaced /proc/self/stat with /proc/self/cmdline in the read_command_name function. Side effects: -Performance effects (性能影响): Minimal impact; reading from /proc/self/cmdline is comparable in performance to reading from /proc/self/stat. -Breaking backward compatibility (向后兼容性): No known breaking changes; the function behavior is expected to improve without impacting existing functionality. -- This is an automated message from the Apache Git Service. To respond to the message, please log on to GitHub and use the URL above to go to the specific comment. To unsubscribe, e-mail: dev-unsubscr...@brpc.apache.org For queries about this service, please contact Infrastructure at: us...@infra.apache.org --------------------------------------------------------------------- To unsubscribe, e-mail: dev-unsubscr...@brpc.apache.org For additional commands, e-mail: dev-h...@brpc.apache.org