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: LD_PRELOAD regression on 1.5.19-4 ? no more loaded library in child process

-----Original Message-----
From: Christopher Faylor
Sent: lundi 30 janvier 2006 18:36
Subject: Re: LD_PRELOAD regression on 1.5.19-4 ? no more loaded library
in child process

>>That's two requests that you follow the guidelines at this page now and
>>you still haven't completely complied.
I will try to fully complied to the guidelines in my next communication.

>>Since you have now (finally) informed us that you are using a non-cygwin
>>binaries, then please read Brian Ford's response to your question.  Cygwin
>>now uses a more efficient mechanism for communicating the environment to
>>cygwin processes.  It does not fill out the windows environment if it
>>knows that the process being started is using the cygwin DLL.

That's explain that I felt, as the child process was inheriting from the parent environment everytime but not non-cygwin DLLs introduced through the LD_PRELOAD in these child process... Is there a flag or a way to enable environment variable to be propaged throught the Win32 environment as done before on 1.5.18-x or do I have to use  DECLARE_CYGWIN_DLL(Entry) & other mechanisms for having my DllMain called as I do specifics initializations for processes & threads.  but that's means compiling all my source containing also assembler & lot of specifics things under gcc :(

Or do this code will help me for having Cygwin environment variables propagated & set in my MSVC dll loaded throught LD_PRELOAD ? by calling the code below is the child process will have his Win32 environment settings set correctly & "retrievable" through GetEnvironmentString() & other Win32 std apis?
Or should I have also to call throught getprocaddress() (after having called LoadLibrary on cygwin1.dll) some cygwin C std methods like getenv() for retrieving cygwin environment variables without porting my code under gcc & staying with microsoft dev studio 2003 ?

HMODULE h = LoadLibrary("cygwin1.dll");
void (*init)() = GetProcAddress(h, "cygwin_dll_init");

>From your point of view, what is the best way for retrieving & inheriting in non cygwin DLL loaded throught LD_PRELOAD of cygwin environment variables ?
thx in advance for your future answers,

Unsubscribe info:
Problem reports:

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