X-Spam-Check-By: sourceware.org Content-class: urn:content-classes:message MIME-Version: 1.0 Content-Type: text/plain; charset="iso-8859-1" Subject: RE: LD_PRELOAD regression on 1.5.19-4 ? no more loaded library in child process Date: Sun, 29 Jan 2006 23:58:42 +0100 Message-ID: <5CD8C8F9F151D142922161D4CF32F940020FD2B2@exch-lv03.intl.businessobjects.com> References: <20060129073453 DOT GA2160 AT efn DOT org> From: "Louis Lecaroz" To: Mailing-List: contact cygwin-help AT cygwin DOT com; run by ezmlm List-Subscribe: List-Archive: List-Post: List-Help: , Sender: cygwin-owner AT cygwin DOT com Mail-Followup-To: cygwin AT cygwin DOT com Delivered-To: mailing list cygwin AT cygwin DOT com Content-Transfer-Encoding: 8bit X-MIME-Autoconverted: from quoted-printable to 8bit by delorie.com id k0TNuxKB028735 I can't help you, but I can see that there's a lot of information missing here. You're right. > What did you actually *do* to get from one step to the next in the > above? Where does your MSVC-linked DLL come into it? What loads that > DLL? What is your system like (the information requested in > http://cygwin.com/problems.html)? First, my DLL is written & built in C by using MS DevStudio 2003. so no by using gcc & CygWin libs Next, I declared it through the LD_PRELOAD, which force cygwin processes (trougth the crt cygwin library) to load it in their memory space That's really simple to reproduce, only create an empty dll with DllMain & a MessageBox showing environment variables in the Attach process step of Dll Main, & you will see that : -The first cygwin process (bash for example) you request load it correctly & environment variable are all in the process -Next from bash, start VI for example, -A new instance (the forky instance) of bash will be started also with the LD_PRELOAD dll loaded correctly & also with all environment variables (If I remember, the cygwin fork() method uses the CreateProcess with longjmg, ect... & pipes for synchronizing initialization throught the parent & the forky). -vim.exe is started through the forky instance of bash (If I am right), the LD_PRELOAD dll is still (& always) loaded correctly but only 3 or 4 environment variables have been propaged (by using GetEnvironmentString win32 APIs as my DLL due to many constraints is compiled by using devenv & not cygwin/gcc as i said above). The problem has been reproducible on my computers, all using a clean install of CygWin 1.5.19-4 with & without last snapshot, & the behavior is exctly reprodicble on Win2000 Server & Win2003 Enterprise server. Downgrading to 1.5.18-x resolve this issue :( >I saw (but did not verify) one report that 1.5.19 doesn't keep the >windows copy of the environment in some situations where 1.5.18 did, >so manually using CreateProcess or the like may work differently. >AFAICT, this falls in the category of "implementation detail" that you >shouldn't be counting on. Thx a lot for having taken & spend your time for answering me, because I wrote this mail from my home, I will try to retrieve more information about my issue later, like cygcheck for example or strace if it returns me useful information, Louis -- Unsubscribe info: http://cygwin.com/ml/#unsubscribe-simple Problem reports: http://cygwin.com/problems.html Documentation: http://cygwin.com/docs.html FAQ: http://cygwin.com/faq/