X-Spam-Check-By: sourceware.org Date: Mon, 25 Dec 2006 13:56:10 -0500 (EST) From: Igor Peshansky Reply-To: cygwin AT cygwin DOT com To: Linda Walsh cc: cygwin AT cygwin DOT com Subject: Re: Updated cygwin dlls cause unnecessary reboot on NT In-Reply-To: <458FEC2E.70705@tlinx.org> Message-ID: References: <458EE598 DOT 3010404 AT aim DOT com> <458F31B1 DOT 6050804 AT byu DOT net> <458F81CC DOT 3090500 AT tlinx DOT org> <458FDC4E DOT 9040505 AT cygwin DOT com> <458FEC2E DOT 70705 AT tlinx DOT org> MIME-Version: 1.0 Content-Type: TEXT/PLAIN; charset=US-ASCII 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 Mon, 25 Dec 2006, Linda Walsh wrote: > Larry Hall (Cygwin) wrote: > > What the file is named is insignificant. When the file is already in > > use, you will run into the situation where the newly installed file is > > not moved into place for use immediately . > --- > That is current cygwin behavior. It isn't required to be that way on > NT. > > Renaming the old file to something else won't help this situation, > > since the original is still in use. > --- > It would seem to solve the original poster's problem of the new files > getting installed with ".new" suffixes and having to reboot to cure the > problem. > Any new processes will use the newly installed library -- not the > original. And that is exactly the problem -- not the .new suffixes. The way Cygwin is designed, you cannot have two versions of the Cygwin DLL (think of it as the kernel) in use at the same time, no matter what the name is. In Linux, you expect to reboot when upgrading the kernel -- why are you surprised that the same happens in Cygwin? > [snip] > The only "caveat" is like the one on Unix: any active processes will > continue to use the old library until those processes are reloaded. > That's not usually an issue. Oh, but it *is* in Cygwin. > It certainly makes cygwin updates easier to not have to reboot. It's > been years since cygwin forced me into a reboot -- I just look at the > pending moves with pendmoves(sysinternals) and do the move, that > cygwin doesn't, manually. I usually move the old libraries to /tmp, > as it will get cleared out automatically by maintenance > processes -- even if a reboot doesn't happen. The easiest way to update Cygwin without rebooting is to stop all Cygwin processes before updating. If you want a fallback in case you forget to stop a process, try the latest setup snapshot, which should have support for interactively warning the user if files are in-use and letting her stop the offending processes and continue. > If you need any more explanation of how to implement this... I think pretty much everyone knows how to implement this. The problem that needs to be solved is how to do this without allowing the user to have more than 1 version of cygwin1.dll in memory at the same time. If you can figure this one out, feel free to submit a patch to Cygwin setup that implements the behavior you suggest. I don't see why it can't work for any libraries other than cygwin1.dll (and maybe a couple of others). However, I doubt that any patch that special-cases the DLL by name will be accepted. HTH, Igor -- http://cs.nyu.edu/~pechtcha/ |\ _,,,---,,_ pechtcha AT cs DOT nyu DOT edu | igor AT watson DOT ibm DOT com ZZZzz /,`.-'`' -. ;-;;,_ Igor Peshansky, Ph.D. (name changed!) |,4- ) )-,_. ,\ ( `'-' old name: Igor Pechtchanski '---''(_/--' `-'\_) fL a.k.a JaguaR-R-R-r-r-r-.-.-. Meow! Freedom is just another word for "nothing left to lose"... -- Janis Joplin -- 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/