Mail Archives: cygwin-developers/1998/05/13/06:20:14
sigproc.cc (proc_exists): Process is alive if OpenProcess() call fails due to security reasons.
--- D:\winsup\sigproc.cc Tue Apr 28 02:21:26 1998
+++ sigproc.cc Wed May 13 16:49:04 1998
@@ -199,10 +199,11 @@ proc_exists (pinfo *p)
return ISSTATE(p, PID_INITIALIZING) || proc_alive (p);
}
if ((h = OpenProcess (STANDARD_RIGHTS_REQUIRED, FALSE, p->dwProcessId))
- != NULL)
+ != NULL || GetLastError () == ERROR_ACCESS_DENIED)
{
sip_printf ("it exists\n");
- CloseHandle (h);
+ if (h)
+ CloseHandle (h);
return ISSTATE(p, PID_INITIALIZING) || proc_alive (p);
}
--
Sergey Okhapkin, http://www.lexa.ru/sos
Moscow, Russia.
- Raw text -