X-Spam-Check-By: sourceware.org To: cygwin AT cygwin DOT com From: Andrew DeFaria Subject: Re: Updated cygwin dlls cause unnecessary reboot on NT Date: Wed, 27 Dec 2006 20:17:03 -0600 Lines: 31 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> <45902BC4 DOT 50803 AT tlinx DOT org> <4590BD4E DOT 5020905 AT cygwin DOT com> <45910426 DOT 9030603 AT tlinx DOT org> <459133CB DOT 3080102 AT ukf DOT net> <45916391 DOT 1090906 AT tlinx DOT org> <45919F7B DOT 8000702 AT tlinx DOT org> <4591FA3C DOT 3020402 AT cygwin DOT com> <4592FB08 DOT 2020205 AT tlinx DOT org> Mime-Version: 1.0 Content-Type: text/plain; charset=ISO-8859-1; format=flowed Content-Transfer-Encoding: 7bit User-Agent: Thunderbird 1.5.0.9 (Windows/20061207) In-Reply-To: X-IsSubscribed: yes 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 Eric Blake wrote: > Actually, you are. The ONLY way to make renaming in-use .dlls work is > to make fork() aware of the rename. The way fork() works is that it > must reload the same .dll as the parent process had loaded, and it > currently does this BY NAME. In other words, changing the name of an > in-use dll will break the child process, even if you then install > another dll at that location, because the new > dll will have a different layout in memory, and will not reload > cleanly. For your scheme to work, you must teach fork() how to track > these renames, and load the original .dll by its new name, and not the > upgraded dll that now lives at the original name. This part peaks my curiosity. Now I'm not a kernel guy however as you state fork currently knows which dlls to load for the child by name. While that makes sense on the outside what if it knew which dlls to load by number - by open file descriptor number that is? I mean wouldn't that be a clean way to change fork() to allow it to load the proper, in this case, old dlls? Another question, how is this not a problem for Unix's fork()? Does Unix's fork also do this by name? Or does it use another mechanism? (I'm not saying that Cygwin's fork == Unix's fork - indeed perhaps there are deep technical reasons why using a file descriptor approach is infeasible in Cygwin under Windows). -- Andrew DeFaria A friend of mine is into Voodoo Acupuncture. You don't have to go. You'll just be walking down the street, and...........ooooohhhhhh, that's much better... -- 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/