This is the mail archive of the cygwin-patches 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: PATCH: avoid system shared memory version mismatch detected by versioning shared memory name


On Thu, Feb 21, 2008 at 05:01:20PM -0800, Noel Burton-Krahn wrote:
>This is a patch to avoid the "system shared memory version mismatch
>detected" problem when two applications use different versions of
>Cygwin.  My solution is to append the Cygwin version number to the
>name of the shared memory segment, so only Cygwin with the same
>version share a memory space.
>
>ChangeLog
>2008-02-21  Noel Burton-Krahn  <noel@burton-krahn.com>
>
>    * shared.cc (shared_name): always add USER_VERSION_MAGIC to the
>    shared memory space name so multiple versions of Cygwin keep their
>     own shared memory space.  No more "system shared memory version
>    mismatch detected"  errors.

Thanks for the patch but the whole reason for this detection and others
in the DLL is to disallow multiple copies of cygwin1.dll from running at
the same time.  This isn't a bug, it's a feature.  That's why we have
the detection in the first place.

As you can see from other checks in the dll, the shared memory region
is just one of the things that are checked for.  If you need to have
two copies of the DLL for debugging then there are ways to do that.
But, in general, it is not a good idea to use two versions of the DLL
unless you really know what you are doing, so we are not going to
be making it trivially possible for everyone to do that.

cgf


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