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: Why only 1 cygwin1.dll?


Thanks for the answer, the question wasn't really leading anywhere
other than idle curiosity. The answer seems like a good candidate for
the FAQ.

jeb

On 3/25/06, Eric Blake <ericblake@comcast.net> wrote:
> > Why can there be only 1 cygwin1.dll in the filesystem? Is this a
> > limitation of the dll or is it just a problem with applications
> > finding the wrong version of the cygwin1.dll when there are several?
>
> It is an intentional design decision of cygwin.  In order to properly
> emulate POSIX semantics in a relatively efficient manner, the .dll
> opens a shared memory region when it is loaded.  If there are
> multiple versions of different copies of the .dll trying to play with
> this shared memory region, you are practically guaranteed problems,
> so the .dll detects if the magic number of the shared region matches
> its expectations and forcefully exits before corrupting the other .dll's
> memory.
>
> > Or is it just that certain cygwin registry keys get initialised wrong
> > if its not installed correctly?
>
> The only use of the registry by cygwin is the mount table, and
> even that might change in the future.  Don't go blaming the
> registry for this issue.
>
> >
> > Does the cygwin1.dll have to be in /usr/bin or would it work in system32?
>
> Technically, as long as there is only one cygwin1.dll in the Windows
> PATH (including the implicit search of the current directory before
> %PATH%), it doesn't matter where it lives.  But you are playing with fire
> if you put it anywhere besides where setup.exe puts it, namely, /usr/bin.
> You are free to remount /usr/bin to live in some other location, if that
> helps, but this mailing list will NOT give any support for installations
> that put cygwin1.dll in non-standard locations other than to say
> delete your duplicate copies.  We even have an acronym for it:
> http://cygwin.com/acronyms/#3PP
>
> >
> > I'm sure this must've been asked before but I couldn't find it in my
> > search of the archives and users guide?
>
> This topic came up just last month, although you are right
> that without knowing good search terms it might not be
> the easiest to find (I did a google for
> "site:cygwin.com mismatched dll"):
> http://www.cygwin.com/ml/cygwin/2006-02/msg00085.html
>
> --
> Eric Blake
>

--
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]