Commit 04a6f044 authored by Cyrill Gorcunov's avatar Cyrill Gorcunov

proc_parse: Zap ending ')' in name

Repored-by: 's avatarPavel Emelyanov <xemul@parallels.com>
Signed-off-by: 's avatarCyrill Gorcunov <gorcunov@openvz.org>
parent 47ba8087
......@@ -177,6 +177,7 @@ err_bogus_mapping:
int parse_pid_stat(pid_t pid, int pid_dir, struct proc_pid_stat *s)
{
FILE *f;
char *tok;
f = fopen_proc(pid_dir, "stat");
if (f == NULL) {
......@@ -239,6 +240,9 @@ int parse_pid_stat(pid_t pid, int pid_dir, struct proc_pid_stat *s)
&s->start_brk);
s->comm[TASK_COMM_LEN-1] = '\0';
tok = strchr(s->comm, ')');
if (tok)
*tok = '\0';
fclose(f);
return 0;
......
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment