summaryrefslogtreecommitdiffstats
path: root/winsup/cygwin/pinfo.cc
diff options
context:
space:
mode:
authorCorinna Vinschen <corinna@vinschen.de>2015-06-08 14:38:30 +0200
committerCorinna Vinschen <corinna@vinschen.de>2015-06-08 14:38:30 +0200
commit95868172f39e972dbcfad3e69fee7854eafe20dd (patch)
treef3b02c59894003fa8cf95d04c965d5e61c4c8fb0 /winsup/cygwin/pinfo.cc
parent511eb2f264c582ac753650b4848edae5b6d8c968 (diff)
downloadcygnal-95868172f39e972dbcfad3e69fee7854eafe20dd.tar.gz
cygnal-95868172f39e972dbcfad3e69fee7854eafe20dd.tar.bz2
cygnal-95868172f39e972dbcfad3e69fee7854eafe20dd.zip
Avoid delays trying to fetch Cygwin info from non-Cygwin processes
* pinfo.cc (_pinfo::commune_request): Don't try to send commune requests to non-Cygwin processes. Signed-off-by: Corinna Vinschen <corinna@vinschen.de>
Diffstat (limited to 'winsup/cygwin/pinfo.cc')
-rw-r--r--winsup/cygwin/pinfo.cc7
1 files changed, 6 insertions, 1 deletions
diff --git a/winsup/cygwin/pinfo.cc b/winsup/cygwin/pinfo.cc
index 4518d6d51..4bebbbc99 100644
--- a/winsup/cygwin/pinfo.cc
+++ b/winsup/cygwin/pinfo.cc
@@ -1,7 +1,7 @@
/* pinfo.cc: process table support
Copyright 1996, 1997, 1998, 2000, 2001, 2002, 2003, 2004, 2005, 2006, 2007,
- 2008, 2009, 2010, 2011, 2012, 2013, 2014 Red Hat, Inc.
+ 2008, 2009, 2010, 2011, 2012, 2013, 2014, 2015 Red Hat, Inc.
This file is part of Cygwin.
@@ -690,6 +690,11 @@ _pinfo::commune_request (__uint32_t code, ...)
set_errno (ESRCH);
goto err;
}
+ if (ISSTATE (this, PID_NOTCYGWIN))
+ {
+ set_errno (ENOTSUP);
+ goto err;
+ }
va_start (args, code);
si._si_commune._si_code = code;