PATCH: avoid system shared memory version mismatch detected by versioning shared memory name

Noel Burton-Krahn
Fri Feb 22 01:01:00 GMT 2008

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.

2008-02-21  Noel Burton-Krahn  <>

    * (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.

Here's how I tested it:

1. save the attached patch


2. patch and build:

tar jxf cygwin-src-20080219.tar.bz2
 cd cygwin-snapshot-20080219-1
patch -p1 < ../cygwin-snapshot-20080219-1-versioned-shared-memory.patch

3. replace cygwin1.dll with the new one

# the compiled cygwin1.dll will not conflict with other cygwins at
# other versions. You can copy it over the cygwin1.dll in one of your
# conflicting applications
cp ./i686-pc-cygwin/winsup/cygwin/new-cygwin1.dll ./cygwin1.dll

It worked for me.  Let me know how it goes for you.

By the way, there's another gotcha here.  Cygwin keeps its mount
points in the registry, so your mount.bat script will overwrite
existing cygwin mount points.  To clean up I had to run the cygwin
setup again.

-------------- next part --------------
A non-text attachment was scrubbed...
Name: cygwin-snapshot-20080219-1-versioned-shared-memory.patch
Type: application/octet-stream
Size: 921 bytes
Desc: not available
URL: <>

More information about the Cygwin-patches mailing list