delorie.com/archives/browse.cgi   search  
Mail Archives: cygwin-developers/1999/06/27/23:07:35

Mailing-List: contact cygwin-developers-help AT sourceware DOT cygnus DOT com; run by ezmlm
Sender: cygwin-developers-owner AT sourceware DOT cygnus DOT com
Delivered-To: mailing list cygwin-developers AT sourceware DOT cygnus DOT com
From: Chris Faylor <cgf AT cygnus DOT com>
Date: Sun, 27 Jun 1999 23:08:39 -0400
To: Mumit Khan <khan AT xraylith DOT wisc DOT EDU>
Cc: cygwin-developers AT sourceware DOT cygnus DOT com
Subject: Re: running two independent Cygwin DLLs?
Message-ID: <19990627230839.A8904@cygnus.com>
References: <199906280258 DOT VAA23658 AT mercury DOT xraylith DOT wisc DOT edu>
Mime-Version: 1.0
X-Mailer: Mutt 0.95.3i
In-Reply-To: <199906280258.VAA23658@mercury.xraylith.wisc.edu>; from Mumit Khan on Sun, Jun 27, 1999 at 09:58:15PM -0500

On Sun, Jun 27, 1999 at 09:58:15PM -0500, Mumit Khan wrote:
>I need to get a setup where I'm running two perhaps incompatible Cygwin
>DLLs, and wondering if that makes any sense at all. This is what I've
>done:
>  - have stock Cygwin dll etc running everything including remote access
>    (that's why I can't just replace the current one etc)
>  - modify the 2nd one (this is a new snapshot) to 
>    * have a different name, say cygwin1-test.dll, and regenerate the
>      import library accordingly, so that the newly linked apps will 
>      refer to this instead.
>    * change the shared address and name so that the new DLL won't
>      see the values for the stock one.
>
>Would this work, or am I fooling myself? I can see some potential
>pitfalls such as mount table issues, but is there something fatal
>waiting to happen?

It should work.  The only mount table issues that I can think of is
if you mount something using one DLL and expect it to show up instantly
in applications using the other DLL.

Note that you won't be able to pass signals between the two DLLs and so
a CTRL-C sent via a bash using one DLL will always terminate a process
running another DLL.

Actually, there may be one problem in an upcoming snapshot.  I've
modified the DLL to refuse to run if it detects that it is being used
via exec or fork from a different DLL.  This probably still won't cause
a problem in your above case as long as you are careful to always use
the right DLL/binary combination.

My only request is:  Please!   Don't even think of advising anyone
to do this at home.  It has great potential for problems and I really
don't want to see people attempting this on the cygwin mailing list.
My standard response to cygwin users has always been to keep only one
version of the DLL on the system.  That is always the safest way to
do things.

But, of course you already know that... :-)

Good Luck,
-chris

- Raw text -


  webmaster     delorie software   privacy  
  Copyright © 2019   by DJ Delorie     Updated Jul 2019