CreateSemaphore/ReleaseSemaphore
Hi,
I'm using several semaphores (max val 1) for IPC:
hnd = CreateSemaphore (NULL, 1, 1, "SEM-1");
....
result = WaitForSingleObject(hnd, INFINITE);
If a process is killed or stopped while it holds the semaphore (val=0), the semaphore is not incremented by Windows (process cleanup ?).
Doesn't windows cleanup (increment semaphore by process' decrements) on process termination ?
I'm using Windows XP, 2000, 2003 Server, each process is a "console Application" developed with VC++ 6.0.
Each assistance is welcome and appreciated.
Thanx a lot.