Welcome to mirror list, hosted at ThFree Co, Russian Federation.

cygwin.com/git/newlib-cygwin.git - Unnamed repository; edit this file 'description' to name the repository.
summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorChristopher Faylor <me@cgf.cx>2000-08-25 06:25:52 +0400
committerChristopher Faylor <me@cgf.cx>2000-08-25 06:25:52 +0400
commit4bb85e7f6720e5cfa362b985527e922a6047a1e4 (patch)
tree98125d02ab558ffc7a54ef080a111ff03e42e2fd /winsup/utils/ps.cc
parent2d5862dee6b6acd965d93f39eed737e67863a34e (diff)
* ps.cc (main): Always print a cygwin process using cygwin paths.
Diffstat (limited to 'winsup/utils/ps.cc')
-rw-r--r--winsup/utils/ps.cc4
1 files changed, 2 insertions, 2 deletions
diff --git a/winsup/utils/ps.cc b/winsup/utils/ps.cc
index 362761290..413defea3 100644
--- a/winsup/utils/ps.cc
+++ b/winsup/utils/ps.cc
@@ -261,7 +261,7 @@ main (int argc, char *argv[])
char pname[MAX_PATH];
if (p->process_state & PID_ZOMBIE)
strcpy (pname, "<defunct>");
- else if (query != CW_GETPINFO_FULL)
+ else if (p->ppid)
{
char *s;
pname[0] = '\0';
@@ -270,7 +270,7 @@ main (int argc, char *argv[])
if (s > pname && strcasecmp (s, ".exe") == 0)
*s = '\0';
}
- else
+ else if (query == CW_GETPINFO_FULL)
{
HANDLE h = OpenProcess (PROCESS_QUERY_INFORMATION | PROCESS_VM_READ, FALSE, p->dwProcessId);
if (!h)