snehavats1404 opened a new pull request, #2857: URL: https://github.com/apache/brpc/pull/2857
## Description - Updated the `read_command_name` function to improve command name handling by using `/proc/self/cmdline` instead of `/proc/self/stat`. - Normalizes command names by removing unnecessary parentheses. ## Changes 1. Replaced `/proc/self/stat` with `/proc/self/cmdline` in `read_command_name`. 2. Added normalization logic to handle edge cases for command names. 3. Validates: - Normal command names. - Command names with parentheses. - Edge cases like empty or malformed input. - Command line with arguments. ## Related Issue Fixes #1251. ## Checklist - [x] Code adheres to [Google C++ coding style](https://google.github.io/styleguide/cppguide.html). - [x] Code is added where appropriate without introducing unrelated changes. -- 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