- client and wrapper (Linux): when parsing /proc/x/stat entries,

handle command names that contains white space
This commit is contained in:
David Anderson 2013-03-15 01:13:13 -07:00 committed by Oliver Bock
parent 8e63d72f3d
commit eb7e3af7ed
1 changed files with 1 additions and 3 deletions

View File

@ -104,7 +104,7 @@ struct PROC_STAT {
int PROC_STAT::parse(char* buf) {
int n = sscanf(buf,
"%d (%s %c %d %d %d %d %d "
"%d (%[^)]) %c %d %d %d %d %d "
"%lu %lu %lu %lu %lu %lu %lu "
"%d %d %d %d %d %d "
"%lu %lu "
@ -152,8 +152,6 @@ int PROC_STAT::parse(char* buf) {
&processor
);
if (n == 39) {
char* p = strchr(comm, ')');
if (p) *p = 0;
return 0;
}