| From: | Andrew Chernow <ac(at)esilo(dot)com> |
|---|---|
| To: | Jeroen Vermeulen <jtv(at)xs4all(dot)nl> |
| Cc: | Merlin Moncure <mmoncure(at)gmail(dot)com>, Magnus Hagander <magnus(at)hagander(dot)net>, PostgreSQL-development <pgsql-hackers(at)postgresql(dot)org> |
| Subject: | Re: libpq WSACleanup is not needed |
| Date: | 2009-01-20 16:26:08 |
| Message-ID: | 4975FB20.30505@esilo.com |
| Views: | Whole Thread | Raw Message | Download mbox | Resend email |
| Thread: | |
| Lists: | pgsql-hackers |
Jeroen Vermeulen wrote:
>
> Would there be any serious harm in:
>
> 1. doing the WSAStartup() when the first connection is opened, but
>
The only problem is how to detect the first connection. In a threaded
environment you'd have to perform locking in connectdb, which is
probably not going to fly.
>>but does it say something similar about shutdown?
From the WSACleanup docs:
"The WSACleanup function typically leads to protocol-specific helper
DLLs being unloaded. As a result, the WSACleanup function should not be
called from the DllMain function in a application DLL. This can
potentially cause deadlocks"
--
Andrew Chernow
eSilo, LLC
every bit counts
http://www.esilo.com/
| From | Date | Subject | |
|---|---|---|---|
| Next Message | Andrew Chernow | 2009-01-20 16:31:31 | Re: libpq WSACleanup is not needed |
| Previous Message | Bruce Momjian | 2009-01-20 16:18:20 | Re: FWD: Re: Updated backslash consistency patch |