This is the mail archive of the
cygwin
mailing list for the Cygwin project.
Re: Bug with dlopen() and fork()
- From: Christopher Faylor <cgf-use-the-mailinglist-please at cygwin dot com>
- To: cygwin at cygwin dot com
- Date: Thu, 20 Feb 2014 10:38:54 -0500
- Subject: Re: Bug with dlopen() and fork()
- Authentication-results: sourceware.org; auth=none
- References: <CAMzR4E7ngKr5HN=QEZXLUuy0VxGbD_xDN7UaTKPmfbmmD8Bz0A at mail dot gmail dot com> <CAMzR4E6eO=m_s4+js=AA_EGntU=LRj9ZURmUqrwYqdVJ31hQWw at mail dot gmail dot com> <20140220145727 dot GN2246 at calimero dot vinschen dot de>
- Reply-to: cygwin at cygwin dot com
On Thu, Feb 20, 2014 at 03:57:27PM +0100, Corinna Vinschen wrote:
>On Feb 20 14:16, Jaime Fabregas Fernandez wrote:
>> Hello Corinna,
>>
>> As you've checked, this behaviour doesn't appear with dll's created by
>> gcc, but it does with Visual Studio C++.
>> That minimal example compiled with VS will result in the freeze of the
>> child process.
>>
>> ================ testlib.h ======================
>> #ifdef TESTLIB_EXPORTS
>> #define TEST_API extern "C" __declspec(dllexport)
>> #else
>> #define TEST_API extern "C" __declspec(dllimport)
>> #endif
>>
>> TEST_API int mylib_open (const char *foo);
>> =============================================
>>
>> =============== testlib.cpp ======================
>> #include "stdafx.h"
>> #include "testLib.h"
>>
>> int
>> mylib_open (const char *foo)
>> {
>> return 1;
>> }
>> ==============================================
>>
>> I've tested several compiler and linker options with same result.
>>
>> Any ideas?
>
>Using MS DLLs across fork in this way is unsupported. If you get it
>working, you're just lucky.
Too bad. We >just< missed the Thursday window.
cgf
--
Problem reports: http://cygwin.com/problems.html
FAQ: http://cygwin.com/faq/
Documentation: http://cygwin.com/docs.html
Unsubscribe info: http://cygwin.com/ml/#unsubscribe-simple