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:
Diffstat (limited to 'winsup/utils/ps.cc')
-rw-r--r--winsup/utils/ps.cc3
1 files changed, 2 insertions, 1 deletions
diff --git a/winsup/utils/ps.cc b/winsup/utils/ps.cc
index 593629c22..362761290 100644
--- a/winsup/utils/ps.cc
+++ b/winsup/utils/ps.cc
@@ -261,9 +261,10 @@ main (int argc, char *argv[])
char pname[MAX_PATH];
if (p->process_state & PID_ZOMBIE)
strcpy (pname, "<defunct>");
- else if (p->progname[0])
+ else if (query != CW_GETPINFO_FULL)
{
char *s;
+ pname[0] = '\0';
cygwin_conv_to_posix_path (p->progname, pname);
s = strchr (pname, '\0') - 4;
if (s > pname && strcasecmp (s, ".exe") == 0)