fix issue #1251
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.
don't format file, just format what you changed
staging all changes u mean? @yanglimingcn
@chenBright is my PR now suitable?
@snehavats1404 Hello, thank you for your contribution. Could you please modify the code according to the feedback provided in the review?