From 210bd56aa26d8d6f88e6c4566981cdb7835b80b9 Mon Sep 17 00:00:00 2001 From: Corinna Vinschen Date: Fri, 1 Feb 2019 13:18:15 +0100 Subject: 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 --- winsup/cygwin/fhandler_process.cc | 5 ++--- 1 file 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. */ -- cgit v1.2.3