X-Recipient: archive-cygwin AT delorie DOT com X-SWARE-Spam-Status: No, hits=-1.3 required=5.0 tests=AWL,BAYES_00,J_CHICKENPOX_62,RCVD_IN_SORBS_WEB,SPF_PASS X-Spam-Check-By: sourceware.org Message-ID: <49B55B33.7020904@dazjorz.com> Date: Mon, 09 Mar 2009 19:08:51 +0100 From: Sjors Gielen User-Agent: Thunderbird 2.0.0.19 (Windows/20081209) MIME-Version: 1.0 To: cygwin AT cygwin DOT com, cygwin AT cygwin DOT com Subject: Re: Replacing setup.exe and cygcheck with dpkg (Was: Re: cygcheck typo in both manpage and --help) References: <5c01594c0903081410n548fdb1ewbb43692129942901 AT mail DOT gmail DOT com> <20090308211548 DOT GA8625 AT ednor DOT casa DOT cgf DOT cx> <49B457E7 DOT 3010406 AT dazjorz DOT com> <20090309014539 DOT GB8625 AT ednor DOT casa DOT cgf DOT cx> <20090309064422 DOT GD6875 AT trikaliotis DOT net> <416096c60903090255m1e21f14dw94624232c94d6f61 AT mail DOT gmail DOT com> <20090309102152 DOT GS31459 AT calimero DOT vinschen DOT de> <20090309151515 DOT GA14910 AT ednor DOT casa DOT cgf DOT cx> In-Reply-To: <20090309151515.GA14910@ednor.casa.cgf.cx> Content-Type: text/plain; charset=ISO-8859-1; format=flowed Content-Transfer-Encoding: 7bit X-IsSubscribed: yes Mailing-List: contact cygwin-help AT cygwin DOT com; run by ezmlm List-Id: 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 Christopher Faylor schreef: > Right. And that has been the main reason why writing an installer which > uses Cygwin is problematic. > > I've been using the "rename the dll or executable" technique for about ten > years to install a newly-compiled version of cygwin1.dll on a system with > a running version of cygwin. However, this hoses any running processes > and it even makes running any cygwin processes flaky until all processes > which use the old DLL have been shut down. > > cgf > You're right. Any testing I've done until now regarding replacing files, did include replacing the Cygwin DLL, but it didn't include replacing the Cygwin DLL with a *different version* of the DLL. I think I checked how Cygwin implements fork() a while ago, can't really remember though. But on a fork(), do processes inherit all information on dll's, et cetera? Or do they reload the dll and re-check the addresses of entry points and all? Something I'm wondering about: When you build something against libfoo.so on Linux, usually you actually link against libfoo.1.2.3 because of the symlinks. I've seen cygfoo1_2_3.dll if I remember correctly - what about never having to replace dlls? This leaves the problem of replacing a Cygwin dll, but this is the only "special" DLL I think. Maybe there should be some kind of background daemon that's fired up when cygwin1.dll needs to be replaced. It then just puts itself in the systray, and when hovered it just says "Hey, maybe you want to reboot sometime soon to have me reload your Cygwin dll..." Then when all Cygwin processes are stopped, or the system reboots (which is the same), the dll is automatically replaced. I *think* this cygfoo1_2_3.dll system does not work with the Cygwin dll itself, because that all still happens completely outside of Cygwin scope, so no linking cygwin1.dll to anything. I'm not at all an expert on these matters, though. Sjors -- 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/