procfs: fix ps can't log out Group id
Signed-off-by: ligd <liguiding1@xiaomi.com>
This commit is contained in:
parent
876b39914b
commit
87c47b8758
@ -498,8 +498,8 @@ static ssize_t proc_status(FAR struct proc_file_s *procfile,
|
||||
DEBUGASSERT(group != NULL);
|
||||
|
||||
linesize = procfs_snprintf(procfile->line, STATUS_LINELEN,
|
||||
"%-12s%d\n", "PPID:",
|
||||
group->tg_ppid);
|
||||
"%-12s%d\n",
|
||||
"Group:", group->tg_pid);
|
||||
copysize = procfs_memcpy(procfile->line, linesize, buffer, remaining,
|
||||
&offset);
|
||||
|
||||
@ -990,6 +990,20 @@ static ssize_t proc_groupstatus(FAR struct proc_file_s *procfile,
|
||||
buffer += copysize;
|
||||
remaining -= copysize;
|
||||
|
||||
if (totalsize >= buflen)
|
||||
{
|
||||
return totalsize;
|
||||
}
|
||||
|
||||
linesize = procfs_snprintf(procfile->line, STATUS_LINELEN, "%-12s%d\n",
|
||||
"Parent:", group->tg_ppid);
|
||||
copysize = procfs_memcpy(procfile->line, linesize, buffer,
|
||||
remaining, &offset);
|
||||
|
||||
totalsize += copysize;
|
||||
buffer += copysize;
|
||||
remaining -= copysize;
|
||||
|
||||
if (totalsize >= buflen)
|
||||
{
|
||||
return totalsize;
|
||||
|
Loading…
Reference in New Issue
Block a user