diff options
author | Corinna Vinschen <corinna@vinschen.de> | 2019-02-01 15:18:15 +0300 |
---|---|---|
committer | Corinna Vinschen <corinna@vinschen.de> | 2019-02-01 15:18:15 +0300 |
commit | 210bd56aa26d8d6f88e6c4566981cdb7835b80b9 (patch) | |
tree | 86b1f896624da5edd100f8299c63f0409a31d571 | |
parent | 351b57527d700b19c87ef3c341f67808351c4b83 (diff) |
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>
-rw-r--r-- | winsup/cygwin/fhandler_process.cc | 5 |
1 files changed, 2 insertions, 3 deletions
diff --git a/winsup/cygwin/fhandler_process.cc b/winsup/cygwin/fhandler_process.cc index 24ef7d00c..29b8c5934 100644 --- a/winsup/cygwin/fhandler_process.cc +++ b/winsup/cygwin/fhandler_process.cc @@ -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. */ |