diff options
Diffstat (limited to 'winsup/cygwin/pinfo.cc')
-rw-r--r-- | winsup/cygwin/pinfo.cc | 3 |
1 files changed, 2 insertions, 1 deletions
diff --git a/winsup/cygwin/pinfo.cc b/winsup/cygwin/pinfo.cc index 48b257699..ffd3d4ec6 100644 --- a/winsup/cygwin/pinfo.cc +++ b/winsup/cygwin/pinfo.cc @@ -182,7 +182,8 @@ pinfo::init (pid_t n, DWORD flag, HANDLE in_h) procinfo = (_pinfo *) MapViewOfFile (h, FILE_MAP_READ | FILE_MAP_WRITE, 0, 0, 0); ProtectHandle1 (h, pinfo_shared_handle); - if ((procinfo->process_state & PID_INITIALIZING) && (flag & PID_NOREDIR)) + if ((procinfo->process_state & PID_INITIALIZING) && (flag & PID_NOREDIR) + && cygwin_pid (procinfo->dwProcessId) != procinfo->pid) { release (); set_errno (ENOENT); |