delorie.com/archives/browse.cgi   search  
Mail Archives: cygwin/2006/12/29/13:24:12

X-Spam-Check-By: sourceware.org
To: cygwin AT cygwin DOT com
From: Andrew DeFaria <Andrew AT DeFaria DOT com>
Subject: Re: Updated cygwin dlls cause unnecessary reboot on NT
Date: Wed, 27 Dec 2006 20:17:03 -0600
Lines: 31
Message-ID: <emv9f1$9fl$1@sea.gmane.org>
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> <Pine DOT GSO DOT 4 DOT 63 DOT 0612251346240 DOT 27982 AT access1 DOT cims DOT nyu DOT edu> <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> <Pine DOT GSO DOT 4 DOT 63 DOT 0612261313480 DOT 27982 AT access1 DOT cims DOT nyu DOT edu> <45919F7B DOT 8000702 AT tlinx DOT org> <4591FA3C DOT 3020402 AT cygwin DOT com> <4592FB08 DOT 2020205 AT tlinx DOT org> <loom DOT 20061228T000321-458 AT post DOT gmane DOT org>
Mime-Version: 1.0
User-Agent: Thunderbird 1.5.0.9 (Windows/20061207)
In-Reply-To: <loom.20061228T000321-458@post.gmane.org>
X-IsSubscribed: yes
Mailing-List: contact cygwin-help AT cygwin DOT com; run by ezmlm
List-Id: <cygwin.cygwin.com>
List-Unsubscribe: <mailto:cygwin-unsubscribe-archive-cygwin=delorie DOT com AT cygwin DOT com>
List-Subscribe: <mailto:cygwin-subscribe AT cygwin DOT com>
List-Archive: <http://sourceware.org/ml/cygwin/>
List-Post: <mailto:cygwin AT cygwin DOT com>
List-Help: <mailto:cygwin-help AT cygwin DOT com>, <http://sourceware.org/ml/#faqs>
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 <http://defaria.com>
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/

- Raw text -


  webmaster     delorie software   privacy  
  Copyright © 2019   by DJ Delorie     Updated Jul 2019