This is the mail archive of the 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: Duplicate CygWin


I understand the problem with the shared memory. Just the same as old network cards with conflicting memory address I guess ?

So, to have two running hetrogenious cygwin's, which may be different versions, I need:

- Rename the memory address space.
- Ensure safe location of cygwin1.dll so that no application uses wrong one.
- Get the different root '/' mount points to be respected.

With the mount points, I was hoping a *hack* as simple as:

char *pRootMount; pRootMount = getenv("ROOT_MOUNT");
if (pRootMount) { ....; return; }

Can be inserted somewhere...

Or maybe even better, the variable FSTAB pointing to an /etc/fstab file on the Windows PC... Endless options.

I'll look for the memory naming following your instructions.

In both cases, I would prefer any options which didn't mean forking the code. So I would be interested in your opinions...


Ronald Landheer-Cieslak wrote:
On Tue, 18 Feb 2003, Ben Clewett wrote:

(Sorry about incorrect subject on first posting)

Noting:- It's not a cut down version of CygWin*.DLL I need, but a cut down version of the file system, to just a couple of dozen files in /bin, /tmp, /usr and /etc, forming a 'mini' UNIX for a specific application.

Just been scanning the postings quickly. My knowlage of the internals of CygWin are vauge, but are you saying it's impossible to have two sideways compatable versions of CygWin installed, as any detected version miss-match (likelly) will drop the code?
It is impossible to have two *different* Cygwin1 DLLs on the same system, running at the same time. This is because Cygwin has a space in memory of its own, which is shared among Cygwin processes. If you have two Cygwin DLLs running at the same time, they will fight eachother for that space. That is why you need to "rename"[1] that space if you want two *different* Cygwin DLLs running on your system at the same time: one of the two must be different from the standard Cygwin. This is what the people behind Xygwin failed to do.

And there is no way of controling CygWin so that it uses only a specific .dll? (ie, using the PATH variable or something...)
That is possible, and is even likely to work if you make sure that:
1. you don't try to use both DLLs at the same time
2. none of the utils you have for one DLL will find the other DLL

My other need, to have a separate /root directory for each runnin Cygwin, I can't see anything on that.

If this is not possible, would it be too hard to put some hack into the .dll to, say, read an environment variable for it's root, before the usual registry search?
Are you talking about the '/' directory or the '/root' directory? The '/' directory is found in the mount table, which (for the time being) is in the registry, the '/root' directory doesn't exist under Cygwin, AFAICT.

The amount of hacking you will need for the two to co-exist is rather
mininal: the thread ends with a patch by cgf (the pricipal Cygwin
maintainer and project manager) which shows you how to do the
registry-part. It does not show you what hacking is required to "rename"
the memory region[1] for Cygwin. You'll have to figure that one out on
your own.


[1]: slightly dumbed down to not get into technical details too much, hope no-one minds :)

Unsubscribe info:
Bug reporting:

Unsubscribe info:
Bug reporting:

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