We read every piece of feedback, and take your input very seriously.
To see all available qualifiers, see our documentation.
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
As per http://man7.org/linux/man-pages/man5/proc.5.html, the second field is the filename of the executable in parentheses:
comm %s The filename of the executable, in parentheses. This is visible whether or not the executable is swapped out.
In the case of spaces in the filename (as I observed today) /proc/[pid]/stat looks like:
/proc/[pid]/stat
1591 (Plex Media Serv) S 1 1591 1591 0 -1 1077952768 19063 0 306 0 257 95 0 0 20 0 17 0 1353 596594688 13330 18446744073709551615 1 1 0 0 0 0 0 4097 17646 18446744073709551615 0 0 17 4 0 0 69 0 0 0 0 0 0 0 0 0 0
Rather than hard coding the field numbers they should be offset from the field ending in ).
)
The text was updated successfully, but these errors were encountered:
Handle process filenames with spaces in the name
7e4cef7
Fixes shirou#120
Thank you very much!
Sorry, something went wrong.
No branches or pull requests
As per http://man7.org/linux/man-pages/man5/proc.5.html, the second field is the filename of the executable in parentheses:
In the case of spaces in the filename (as I observed today)
/proc/[pid]/stat
looks like:Rather than hard coding the field numbers they should be offset from the field ending in
)
.The text was updated successfully, but these errors were encountered: