Cygwin: /proc: don't exit prematurely from /proc/PID/status

If a process is just exiting, requesting memory info may fail
with STATUS_PROCESS_IS_TERMINATING.  Right now the code just bails
out if fetching mem info fails.  However, the rest of the info is
still valuable for procps, so just carry on.

Signed-off-by: Corinna Vinschen <corinna@vinschen.de>
This commit is contained in:
Corinna Vinschen 2019-02-01 13:18:15 +01:00
parent 351b57527d
commit 210bd56aa2
1 changed files with 2 additions and 3 deletions

View File

@ -1212,9 +1212,8 @@ format_process_status (void *data, char *&destbuf)
state_str = "stopped";
break;
}
if (!get_mem_values (p->dwProcessId, vmsize, vmrss, vmtext, vmdata,
vmlib, vmshare))
return 0;
get_mem_values (p->dwProcessId, vmsize, vmrss, vmtext, vmdata,
vmlib, vmshare);
/* The real uid value for *this* process is stored at cygheap->user.real_uid
but we can't get at the real uid value for any other process, so
just fake it as p->uid. Similar for p->gid. */