iphlpapi: _res is per-thread in glibc with pthreads

classic Classic list List threaded Threaded
2 messages Options
Reply | Threaded
Open this post in threaded view
|

iphlpapi: _res is per-thread in glibc with pthreads

Dan Kegel
With test.  Without the fix, the test case crashes on my machine.
Fixes crash in bug http://bugs.winehq.org/show_bug.cgi?id=21624

Same fix probably needed in dnsapi, or maybe iphlpapi should
use dnsapi rather than unix dns api.

Thanks to AF for the analysis.



ip.patch (3K) Download Attachment
Reply | Threaded
Open this post in threaded view
|

Re: iphlpapi: _res is per-thread in glibc with pthreads

John Klehm
On Mon, Feb 8, 2010 at 12:01 AM, Dan Kegel <[hidden email]> wrote:
> With test.  Without the fix, the test case crashes on my machine.
> Fixes crash in bug http://bugs.winehq.org/show_bug.cgi?id=21624
>
> Same fix probably needed in dnsapi, or maybe iphlpapi should
> use dnsapi rather than unix dns api.
>
> Thanks to AF for the analysis.
>

     testWin98OnlyFunctions();
     testWinNT4Functions();
-    testWin98Functions();
+    thread = CreateThread(NULL, 0, testWin98Functions, NULL, 0, &threadId);
+    testWin98Functions(NULL);
+    WaitForSingleObject( thread, INFINITE );

Is that extra non threaded testWin98Functions(NULL) supposed to be in there?

Regards,
--John Klehm