Re: Win32 semaphore patch - Mailing list pgsql-patches

From Magnus Hagander
Subject Re: Win32 semaphore patch
Date
Msg-id 6BCB9D8A16AC4241919521715F4D8BCEA352D9@algol.sollentuna.se
Whole thread Raw
In response to Win32 semaphore patch  (Qingqing Zhou <zhouqq@cs.toronto.edu>)
List pgsql-patches
> > For #2, yes, the semaphores will go away when the last
> process holding
> > a HANDLE to it goes away. For #1, the code seems to handle
> that right?
> >
>
> I intentionally use *unnamed* semaphores to avoid these
> problems -- even if the semaphores didn't go away (as Magus
> pointed out, if all processes can exit gracefully, this won't
> happen), we won't worry about them -- Creating semahpores
> will still succeed because there is no existent same named
> semaphores will bother it.

Just a point - they will get automatically cleaned up even if the
process doesn't exit *gracefully*, as long as it exits. Only if it's
hung and won't actually exit will the handles not get cleaned up.
This goes for both named and unnamed ones.

//Magnus

pgsql-patches by date:

Previous
From: Tom Lane
Date:
Subject: Re: Win32 semaphore patch
Next
From: "Qingqing Zhou"
Date:
Subject: Re: Win32 semaphore patch