summaryrefslogtreecommitdiffstats
path: root/winsup/cygwin/pinfo.cc
diff options
context:
space:
mode:
authorChristopher Faylor <me@cgf.cx>2005-03-08 05:05:02 +0000
committerChristopher Faylor <me@cgf.cx>2005-03-08 05:05:02 +0000
commit18edcecfbf74f23bffeefcaca1722407f6a9f597 (patch)
tree659de52828393063ae25a9e158cef9a516bf2cd1 /winsup/cygwin/pinfo.cc
parent453456187764ae9cd1911693bf4d68e85898b9cf (diff)
downloadcygnal-18edcecfbf74f23bffeefcaca1722407f6a9f597.tar.gz
cygnal-18edcecfbf74f23bffeefcaca1722407f6a9f597.tar.bz2
cygnal-18edcecfbf74f23bffeefcaca1722407f6a9f597.zip
* dcrt0.cc (dll_crt0_0): Eliminate muto::init call.
* sync.h (locker): New, currently unused class. (muto::init): Eliminate. * sync.cc (muto::init): Ditto. (muto::init): Eliminate critical section lock and instead use name as a guard to prevent against multiple attempts to initialize the same muto. * pinfo.cc (pinfo::init): Set myself procinfo when not execing and pid matches windows pid or cygwin pid.
Diffstat (limited to 'winsup/cygwin/pinfo.cc')
-rw-r--r--winsup/cygwin/pinfo.cc3
1 files changed, 2 insertions, 1 deletions
diff --git a/winsup/cygwin/pinfo.cc b/winsup/cygwin/pinfo.cc
index b77b4c0d2..a7b650a98 100644
--- a/winsup/cygwin/pinfo.cc
+++ b/winsup/cygwin/pinfo.cc
@@ -173,7 +173,8 @@ void
pinfo::init (pid_t n, DWORD flag, HANDLE h0)
{
h = NULL;
- if (myself && n == myself->pid)
+ if (myself && !(flag & PID_EXECED)
+ && (n == myself->pid || (DWORD) n == myself->dwProcessId))
{
procinfo = myself;
destroy = 0;