X-Spam-Check-By: sourceware.org
Message-ID: <46B0D609.3BBBAA5E@dessent.net>
Date: Wed, 01 Aug 2007 11:50:49 -0700
From: Brian Dessent <brian@dessent.net>
X-Mailer: Mozilla 4.79 [en] (Windows NT 5.0; U)
MIME-Version: 1.0
To: cygwin@cygwin.com
Subject: Re: is LD_PRELOAD available in cygwin?
References: <46B02E5F.3080408@gmail.com> <46B0A563.B672E63@dessent.net> <20070801183926.GC6530@ednor.casa.cgf.cx>
Content-Type: text/plain; charset=us-ascii
Content-Transfer-Encoding: 7bit
X-IsSubscribed: yes
Reply-To: cygwin@cygwin.com
Mailing-List: contact cygwin-help@cygwin.com; run by ezmlm
List-Id: <cygwin.cygwin.com>
List-Subscribe: <mailto:cygwin-subscribe@cygwin.com>
List-Archive: <http://sourceware.org/ml/cygwin/>
List-Post: <mailto:cygwin@cygwin.com>
List-Help: <mailto:cygwin-help@cygwin.com>, <http://sourceware.org/ml/#faqs>
Sender: cygwin-owner@cygwin.com
Mail-Followup-To: cygwin@cygwin.com
Delivered-To: mailing list cygwin@cygwin.com

Christopher Faylor wrote:

> Sorry, Brian, but this isn't correct.  LD_PRELOAD has been available for
> Cygwin for a while.
> 
> It's not 100% like linux but it is close.  You can only override cygwin
> functions with it but that should work for open().  If this isn't working
> under cygwin, I'd suspect function decorations are not right, i.e., the
> open() function name being trapped doesn't look the same as the open in
> cygwin1.dll.
> 
> ...either that or LD_PRELOAD is broken.  I haven't played with it for a
> while.

Oh, excellent.  I knew there were some cases of the LD_* things being
supported (e.g. LD_LIBRARY_PATH in the context of dlopen) but I didn't
know this was one of them as well.

Brian

--
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/

