This is the mail archive of the cygwin mailing list for the Cygwin project.


Index Nav: [Date Index] [Subject Index] [Author Index] [Thread Index]
Message Nav: [Date Prev] [Date Next] [Thread Prev] [Thread Next]
Other format: [Raw text]

Re: Updated cygwin dlls cause unnecessary reboot on NT


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/


Index Nav: [Date Index] [Subject Index] [Author Index] [Thread Index]
Message Nav: [Date Prev] [Date Next] [Thread Prev] [Thread Next]