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' descrements) 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.
Instead of using a semaphore with count 1, use a mutex, because
WAIT_ABANDONED will be returned in the event that the mutex-holder is
terminated.
A semaphore is not "held" like a mutex is held. It is just a
waitable-atomic-counter.
"nrieger" <nri...@discussions.microsoft.com> wrote in message
news:A77D8544-DD8F-4EC6...@microsoft.com...