This is the mail archive of the cygwin mailing list for the Cygwin project.


Index Nav: [Date Index] [Subject Index] [Author Index] [Thread Index]
Message Nav: [Date Prev] [Date Next] [Thread Prev] [Thread Next]
Other format: [Raw text]

Re: Bug with dlopen() and fork()


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.


Corinna

-- 
Corinna Vinschen                  Please, send mails regarding Cygwin to
Cygwin Maintainer                 cygwin AT cygwin DOT com
Red Hat

Attachment: pgp2C8dTucOny.pgp
Description: PGP signature


Index Nav: [Date Index] [Subject Index] [Author Index] [Thread Index]
Message Nav: [Date Prev] [Date Next] [Thread Prev] [Thread Next]