X-Spam-Check-By: sourceware.org Date: Tue, 16 Jan 2007 16:33:41 -0500 From: Christopher Faylor To: cygwin AT cygwin DOT com Subject: Re: Cygwin Python/PIL TCL/TK fork rebase solution Message-ID: <20070116213341.GA21651@trixie.casa.cgf.cx> Reply-To: cygwin AT cygwin DOT com Mail-Followup-To: cygwin AT cygwin DOT com References: <87ejpvluvj DOT fsf AT superfluity DOT lefae DOT org> <3D1F5241A4BA56B7EBA1D30B AT qjunbur DOT quns DOT cam DOT ac DOT uk> <45ACC59F DOT 397A6589 AT dessent DOT net> <45ACCBEF DOT 49170261 AT dessent DOT net> <45AD15BD DOT 5ED52565 AT dessent DOT net> Mime-Version: 1.0 Content-Type: text/plain; charset=us-ascii Content-Disposition: inline In-Reply-To: <45AD15BD.5ED52565@dessent.net> User-Agent: Mutt/1.5.11 Mailing-List: contact cygwin-help AT cygwin DOT com; run by ezmlm Precedence: bulk List-Id: List-Unsubscribe: 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 On Tue, Jan 16, 2007 at 10:13:17AM -0800, Brian Dessent wrote: >Robin Walker wrote: >>Thanks for the explanations. So, if I've understood things correctly, >>the difficulty boils down to cloning a parent process's address space >>layout within that of a child, which includes ensuring that DLLs appear >>at the same base within both processes. > >Note that the "cloning" that is happening in the case of Cygwin is done >entirely in userspace without any co-operation from the OS/kernel, >essentially by faking it -- spawn another copy of the binary and hope >that it takes the same layout. Note that Cygwin can do some fixups on >things like file handles and things that were allocated under its >control, but it's totally at the mercy of the operating system for >things out of its control like where DLLs get loaded. I did add some code to cygwin many years ago which attempts to dynamically load dlls at the right place by allocating memory up to the place where the dll is supposed to load. You can't do that with DLLs loaded by the OS, though. cgf -- 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/