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/