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: LD_PRELOAD regression on 1.5.19-4 ? no more loaded library in child process Date: Thu, 26 Jan 2006 11:37:18 +0100 Message-ID: <5CD8C8F9F151D142922161D4CF32F9400573F5EF@exch-lv03.intl.businessobjects.com> 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 k0QAd58n003374 Hi all CygWin champions developers ;) Since this version, the LD_PRELOAD tag is no more replicated to subprocess (Win32 version of cygwin). That means, if I set the LD_PRELOAD variable, only the parent process calls the LoadLibrary & load the DLL defined in LD_PRELOAD. In this case, when starting bash, the LD_PRELOAD command is executed. but when starting a cp.exe, cat.exe or another cygwin command from the bash shell, the LD_PRELOAD is no more executed ! If I performed : SET LD_PRELOAD=/cygdrive/d/mydll.dll c:\bash (mydll.dll loaded correctly) $cp toto.txt titi.txt (no mydll.dll loaded !) If I performed : SET LD_PRELOAD=/cygdrive/d/mydll.dll c:\bash (mydll.dll loaded correctly) $cmd c:\cp toto.txt titi.txt (mydll.dll loaded) So, it works now in this last build of cygwin as it was working previously the snapshot #20050811 To correct this, a snapshot has been provided, snapshot #20050811, See ChangeLog in winsup\cygwinChangeLog : 2005-08-11 Christopher Faylor * dcrt0.cc: Remove ld_preload declaration. * winsup.h: Move ld_preload declaration here. * fork.cc (fork_child): Call ld_preload() before returning. So this issue was corrected by ffork.cc version 1.158 of ffork.ccd I took a quick look into the ffork.cc, & I saw that the fixup_hooks_after_fork () & _my_tls.fixup_after_fork () are now called after ld_preload instead of before as deliverd in snapshot #20050811. I don't know exactly if this is the reason of my issue. This is not maybe a regression as I suppose this because it does not work now as it has been designed since this snapshot to work. Did this behavior has been since modified to work by another way ? Thx in advance for all the help you will be able to provide me, 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/