brpc icon indicating copy to clipboard operation
brpc copied to clipboard

fix issue #1251

Open snehavats1404 opened this issue 11 months ago • 4 comments

What problem does this PR solve?

Issue Number: resolve #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.

snehavats1404 avatar Jan 12 '25 15:01 snehavats1404

don't format file, just format what you changed

yanglimingcn avatar Jan 13 '25 03:01 yanglimingcn

staging all changes u mean? @yanglimingcn

snehavats1404 avatar Jan 13 '25 05:01 snehavats1404

@chenBright is my PR now suitable?

snehavats1404 avatar Jan 13 '25 09:01 snehavats1404

@snehavats1404 Hello, thank you for your contribution. Could you please modify the code according to the feedback provided in the review?

lorinlee avatar Apr 03 '25 14:04 lorinlee